在类中定义
Private Declare Function ShellExecute Lib “shell32.dll” Alias “ShellExecuteA” (ByVal hwnd As Int32, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Int32) As Int32
在事件中加上
Dim pathStr As String =“c:\1.xls"
ShellExecute(Me.Handle.ToInt32, “Open”, pathStr, “”, “”, 1)