7,763
社区成员
发帖
与我相关
我的任务
分享
Private Sub Command1_Click()
Dim a() As Byte
Dim b() As Byte
a = "1234abc"
b = "abc"
b(2) = 0
a(6) = 0
a(10) = 0
Debug.Print InStr(a, b), a, b, UBound(a), UBound(b)
ReDim Preserve a(14)
a(14) = 66
ReDim Preserve b(6)
b(6) = 65
Debug.Print InStrB(a, b), a, b, UBound(a), UBound(b)
b(6) = 66
Debug.Print InStrB(a, b), a, b, UBound(a), UBound(b)
End Sub
Private Sub Command1_Click()
Dim a() As Byte
Dim b() As Byte
a = "1234abc"
b = "abc"
b(2) = 0
a(6) = 0
a(10) = 0
Debug.Print InStr(a, b), a, b, UBound(a), UBound(b)
ReDim Preserve a(14)
a(14) = 66
ReDim Preserve b(6)
b(6) = 65
Debug.Print InStrB(a, b), a, b, UBound(a), UBound(b)
End Sub