什么是逻辑 negation/not 运算符的等价物
What is the equivalent of logical negation/not operator
当 excel 单元格 不是 为空时,我必须执行一段用 Visual Basic for Applications (VBA) 编写的代码。到目前为止,我已经编写了以下代码:
Public Sub BindTitles(ByVal cell As Range)
If IsEmpty(cell.Value) Then
Application.EnableEvents = False
'other code
End If
End Sub
我想反转 If
语句中的逻辑条件。在 C# 中,我使用 exclamation operator !
但是当我把它放在 If
块中时它给出以下错误:
Compile error:
Invalid or unqualified reference
VBA 中的逻辑非 !
运算符是 Not
:
If Not IsEmpty(cell.Value) Then '...
当 excel 单元格 不是 为空时,我必须执行一段用 Visual Basic for Applications (VBA) 编写的代码。到目前为止,我已经编写了以下代码:
Public Sub BindTitles(ByVal cell As Range)
If IsEmpty(cell.Value) Then
Application.EnableEvents = False
'other code
End If
End Sub
我想反转 If
语句中的逻辑条件。在 C# 中,我使用 exclamation operator !
但是当我把它放在 If
块中时它给出以下错误:
Compile error:
Invalid or unqualified reference
VBA 中的逻辑非 !
运算符是 Not
:
If Not IsEmpty(cell.Value) Then '...