小编Zai*_*der的帖子

Excel VBA instr if语句为false

我试图寻找值2,但是"不应该发生"会显示而不是其他,"确定".

If Not InStr("1, 2, 3", "2") Then
    MsgBox ("shouldn't happen")
Else
    MsgBox ("ok")
End If
Run Code Online (Sandbox Code Playgroud)

我们知道值在字符串中.但由于某种原因,"不"不起作用.有谁知道为什么?

string excel vba if-statement contains

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

contains ×1

excel ×1

if-statement ×1

string ×1

vba ×1