奔富1972年葛兰许价格:VB中的语句,高手帮忙解释一下
来源:百度文库 编辑:高考问答 时间:2024/04/28 22:20:43
Dim abc
abc = Shell("D:\Program Files\Microsoft Office\OFFICE11\winword.exe", 1)
Const Path="D:\test.exe"
Private Sub Command1_Click()
if dir(path)="" then:msgbox "没有找到'" & path & ".":exit sub
Shell Path
End Sub
帮忙解释清楚,这些语句的意思
abc = Shell("D:\Program Files\Microsoft Office\OFFICE11\winword.exe", 1)
Const Path="D:\test.exe"
Private Sub Command1_Click()
if dir(path)="" then:msgbox "没有找到'" & path & ".":exit sub
Shell Path
End Sub
帮忙解释清楚,这些语句的意思
点击Command1按钮时,先判断"D:\test.exe"文件是否存在,如果不存在就终止运行,如果存在的话,就运行"D:\test.exe"文件。
abc = Shell("D:\Program Files\Microsoft Office\OFFICE11\winword.exe", 1)
上面这句是运行WORD程序,其中变量abc用来接收shell函数的返回值,其实在这里没怎么用,下面这样写也行:
Shell "D:\Program Files\Microsoft Office\OFFICE11\winword.exe", 1
很简单 你基本 的 Command1_Click()
模块没开启或者建立