代码如下:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPrivate Sub Command1_Click()
Dim strFile As String
strFile="c:\test.doc"
ShellExecute 0, "open", strFile, "", "", 1 strFile="c:\test.txt"
ShellExecute 0, "open", strFile, "", "", 1 strFile="c:\test.xls"
ShellExecute 0, "open", strFile, "", "", 1
End Sub在第一次打开应用程序时出错:程序最后面加了一个"()",提示语法错语,删除后又能运行关掉应用程序后,又加了"()"请问是什么原因?
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPrivate Sub Command1_Click()
Dim strFile As String
strFile="c:\test.doc"
ShellExecute 0, "open", strFile, "", "", 1 strFile="c:\test.txt"
ShellExecute 0, "open", strFile, "", "", 1 strFile="c:\test.xls"
ShellExecute 0, "open", strFile, "", "", 1
End Sub在第一次打开应用程序时出错:程序最后面加了一个"()",提示语法错语,删除后又能运行关掉应用程序后,又加了"()"请问是什么原因?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货