如何表达“如果值不为空”在VBA语言中? [英] How do I express "if value is not empty" in the VBA language?
本文介绍了如何表达“如果值不为空”在VBA语言中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在VBA语言中表达条件如果值不为空?是这样吗?
How do I express the condition "if value is not empty" in the VBA language? Is it something like this?
"if value is not empty then..."
Edit/Delete Message
推荐答案
使用 Not IsEmpty() / code>。
Use Not IsEmpty()
.
例如:
Sub DoStuffIfNotEmpty()
If Not IsEmpty(ActiveCell.Value) Then
MsgBox "I'm not empty!"
End If
End Sub
这篇关于如何表达“如果值不为空”在VBA语言中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文