VBA 使用InStr确定字符串是否包含子字符串
示例
Const baseString As String = "Foo Bar"Dim containsBar As Boolean
'Check if baseString contains "bar" (case insensitive)
containsBar = InStr(1, baseString, "bar", vbTextCompare) > 0
'containsBar = True
'Check if baseString contains bar (case insensitive)
containsBar = InStr(1, baseString, "bar", vbBinaryCompare) > 0
'containsBar = False
以上是 VBA 使用InStr确定字符串是否包含子字符串 的全部内容, 来源链接: utcz.com/z/343178.html