Re: Open htm File

Tech-Archive recommends: Speed Up your PC by fixing your registry



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


"B F Cole" <bfcole@xxxxxxxxx> wrote in message
news:K8Erg.19010$so3.18278@xxxxxxxxxxxxxxxxxxx
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




.


Quantcast