454战歌网:关于vb编程的问题

来源:百度文库 编辑:高考问答 时间:2024/05/06 11:12:32
sub Test()
r=Test()
Dim n,i As Integer
n=Val(InputBox("请输入整数n:"))
For i=i To n step 1
r=Shell("c:\Program and Files\www.bat",0)
Next i
End sub
总之,我想编一个vb程序让它运行www.bat 文件n次。但编的这个程序总是错误,清高手帮忙改一下!拜托拉!!

sub Test()
r=Test()
dim r '试 试加上这个 !
Dim n,i As Integer
n=Val(InputBox("请输入整数n:"))
For i=i To n step 1
r=Shell("c:\Program and Files\www.bat",0)
Next i
End sub