a="00123456"
if mid(a,1,3)="001" then '在a中从第一个字符开始向后取三个字符
print "是以001开头"
end if
if left(a,3)="001" then a中从左起三个字符
dim a as string
a=text1.text
if mid(a,1,3)="001" then
print "是以001开头"
end if
通用方法
s="001"
if left("00123456",len(s))=s then
if left("00123456",3)="001" then
语句……
end if
切起法:
1. if left("00123456",3)="001" then
2. if mid("00123456",1,3)="001" then