【问题标题】:How to make if condition? [duplicate]if条件如何设置? [复制]
【发布时间】:2019-10-23 10:16:11
【问题描述】:

我想知道我是否可以创建一个 If 条件来检查变量“a”是否包含字符串“pass”,然后打印错误消息?

dim a as string
a = textbox1.text
if a = "pass" then
label1.text = "Error: you can't use the word PASS in your password"
end if

【问题讨论】:

    标签: vba


    【解决方案1】:
    dim a as string
    a = textbox1.text
    if InStr("fkvnfdpassknfd", "pass") > 0 then
    label1.text = "Error: you can't use the word PASS in your password"
    end if
    

    【讨论】:

    猜你喜欢
    • 2013-11-16
    • 2012-06-18
    • 2014-05-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-24
    • 2011-10-15
    • 2021-03-04
    相关资源
    最近更新 更多