
示例代 码:
1. 打开记事本
Private Sub Command1_Click()
Shell "Notepad E: ¥VB 练习¥添加 DTPicker 控件.txt ",
vbNormalFocus
End Sub
注:NotePad后有空格
2. 打开 QQ 登陆界面
Private Sub Command2_Click()
Shell "D: ¥Program Files ¥Tencent ¥QQ2009¥Bin ¥qq.exe",
vbNormalFocus
End Sub
3. 打开 Word 文档
Private Sub Command3_Click(Index As Integer)
Dim strDir As String
strDir = "E: ¥VB 练习 ¥Test.doc"
Select Case Index
Case 0
Shell "C: ¥Program Files ¥Microsoft
Office ¥OFFICE11¥WINWORD.EXE " & strDir, vbHide
Case 1
Shell "C: ¥Program Files ¥Microsoft
Office ¥OFFICE11¥WINWORD.EXE " & strDir, vbNormalFocus
评论0
最新资源