美国夏令营老师招聘:VB的LIKE用法

来源:百度文库 编辑:杭州交通信息网 时间:2024/06/07 05:54:07
假如TEXT1="ABC01"combo1.text="ABC"
if text1=text1 like combo1.text "*" then
exit sub
end if

这么写对吗?

这种写法不正确,应该写成If Text1 Like "*" + Combo1.Text + "*" Then exit sub
LIKE关键字是进行模糊查询,要加上“*”才可以实现模糊查询。