为什么“赞”语句不起作用?
“ =”语句检查为true,但“ like”运算符检查为false,为什么?
Sub sandbox2()
Dim TagForm As String
TagForm = "tag(1###)<EX-->"
Debug.Print "Compare: " & Sheets(2).Cells(2,2).Value & " To: " & TagForm
If Sheets(2).Cells(2,2).Value = TagForm Then 'this works... displays message "Match!"
MsgBox "Match!"
End If
If Sheets(2).Cells(2,2).Value Like TagForm Then 'this does not work... Does not display "Match!"
MsgBox "Match!"
End If
End Sub