DataBlake
Well-known Member
- Joined
- Jan 26, 2015
- Messages
- 781
- Office Version
- 2016
- Platform
- Windows
Code:
Sub test()
Dim textVAR(0 To 5) As String
Dim i as Long
textVAR(0) = "Do"
textVAR(1) = "Re"
textVAR(2) = "Me"
textVAR(3) = "Fa"
textVAR(4) = "So"
textVAR(5) = "La"
For i = LBound(textVAR) To UBound(textVAR)
If textVAR = "Do" Then
msgbox textVAR
Else
msgbox "Nope"
End If
next i
End Sub
if i pull textVAR into the watch window it shows value as "Can't compile module" and type "Empty"
its highlighting the = on the if statement with type mismatch error
Last edited: