Problem with Shell command
I have partially answered my question, but I would still be interested in
why the simpler Shell command does not work. The following works
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 Long
Sub OpenFile()
Dim file As String
file = "C:\vba\copy7.htm"
Call ShellExecute(0&, vbNullString, file, _
vbNullString, vbNullString, vbNormalFocus)
End Sub
|