📄 19195.html
字号:
<html> <head> <title>Re: 小v,这个方法我已试过了,不行的....</title> </head> <body bgcolor="#FFFFFF" vlink="#808080"> <center> <h1>Re: 小v,这个方法我已试过了,不行的....</h1> </center><hr size=7 width=75%><hr size=7 width=75%><p>Posted by andyLin on September 20, 1999 at 19:10:21:<p>In Reply to: <a href="19184.html">小v,这个方法我已试过了,不行的....</a> posted by 新手 on September 20, 1999 at 17:09:19:<p>: : : 若Text1.text之资料不在有9笔资料的List1中,就显示MsgBox。<br>: : dim i as integer,IsExist as boolean<br>: : IsExist=false<br>: : for i=0 to List1.ListCount - 1<br>: : if List1.List(i)=Text1.text then<br>: : IsExist=true<br>: : exit for<br>: : end if<br>: : next<br>: : if not IsExist then<br>: : msgbox "Not Found!"<br>: : end if<p>: 这样不对,若第一笔的时候就为True会跳出了For,后面的没比较到,在中间也是一样,一定要全部读完后比较才正确。<p>我将程式改为<br>: dim i as integer,IsExist as boolean<br>:dim ErrStr as string<br>: IsExist=false<br>: for i=0 to List1.ListCount - 1<br>: if List1.List(i)=Text1.text then<br>: errStr=Errstr & List1.List(i) & ","<br>: end if<br>: next<br>: if not IsExist then<br>: msgbox errstr & " Not Found!"<br>: end if<p><br><br><hr size=7 width=75%><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 19195--></ul><!--end: 19195--><br><hr size=7 width=75%><p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -