个性自我评价一句话:VB的LIKE用法

来源:百度文库 编辑:高校问答 时间:2024/04/26 19:40:13
假如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关键字是进行模糊查询,要加上“*”才可以实现模糊查询。