问题是!=
在excel vba中不起作用。Excel VBA中的“!=”是什么?
我希望能够使用的
If strTest != "" Then
代替If strTest = "" Then
是否有另一种方式来做到这一点,除了!=
?
My功能模仿!=
是
Sub test()
Dim intTest As Integer
Dim strTest As String
intTest = 5
strTest = CStr(intTest) ' convert
Range("A" + strTest) = "5"
For i = 1 To 10
Cells(i, 1) = i
If strTest = "" Then
Cells(i, 1) = i
End If
Next i
End Sub
你确定它是'!='而不是'<>'? – dasblinkenlight 2012-07-21 20:56:17
你的问题是什么?为什么'!='在vba中不起作用,或vba中的不等式运算符是什么? – GSerg 2012-07-21 20:56:36
http://duckduckgo.com/?q=VBA+comparison+operators – 2012-11-16 08:07:37