我试图获得 True 或 False ,具体取决于如果在工作表中找到字符串&# 34; FAL"
Dim stress As Boolean
If fal.UsedRange.Find("Approach = STRESS") > 0 Then
stress = True
Else
stress = False
End If
它给出了"运行时错误' 91':对象变量或者没有设置块"
有什么想法吗?
答案 0 :(得分:2)
试试这个:
Dim stress As Boolean
stress = Not fal.UsedRange.Find("Approach = STRESS") Is Nothing