作者:少年tyrty | 来源:互联网 | 2023-05-18 22:12
Imconfus.Whichtwoformsarecorrect?我很困惑。哪两种形式是正确的?IfIsEmpty(Cells(i,j))ThenMsgBox(This
I'm confus. Which two forms are correct?
我很困惑。哪两种形式是正确的?
If IsEmpty(Cells(i, j)) Then
MsgBox ("This cell is empty!")
End If
If Not IsEmpty(Cells(i, j)) Then
MsgBox ("This cell contains something!")
End If
...or:
If IsEmpty(Cells(i, j)) = True Then
MsgBox ("This cell is empty!")
End If
If IsEmpty(Cells(i, j)) = False Then
MsgBox ("This cell contains something!")
End If
Basically, do I need to compare the IsEmpty function to a boolean value?
基本上,我需要将IsEmpty函数与布尔值进行比较吗?
2 个解决方案