复制代码
- '随机在1-20间取值,当值为15时弹出消息框
- dim num,counter,choice
- do until choice=vbno
- counter=0:num=0
- do while num<>15
- randomize
- counter=counter+1
- num=int((20*rnd)+1)
- loop
- choice=msgbox("循环了"&counter&"次取到值"&num,vbyesno,"是否再次取值")
- loop
欢迎光临 批处理之家 (http://bathome.net./) | Powered by Discuz! 7.2 |