Open htm File

  • Thread starter Thread starter B F Cole
  • Start date Start date
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
 
Check out help on FollowHyperlink()

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

Ought to get it done for you
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top