Open htm File

B

B F Cole

I would like to open an html file with a command button.

This code doesn't seem to work. Generates a "file not found message". The
not found file is iexplore.exe.

Dim stAppName As String

stAppName = "iexplore.exe c:\db files\manual.htm"
Call Shell(stAppName, 1)

Any suggestions on opening this htm file with internet explorer?

Thanks,
Bill
 
R

Ron Weiner

Check out help on FollowHyperlink()

FollowHyperlink(":\db files\manual.htm")

Ought to get it done for you
 
V

Vsn

this one executes any file with its associated execudable

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 cmdFire(stgFile as string)

Dim RetVal

stgFile = Trim$(LCase$(Chr$(34) & stgDir & stgFile & Chr$(34)))
stgDir = ""

RetVal = ShellExecute(Me.hwnd, vbNullString, stgFile, vbNullString,
stgDir, 1)


End sub

might help in the future.

Ludovic
 
Top