Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Internet Explorer 1

Status
Not open for further replies.

ElGuapo

Programmer
Aug 29, 2001
42
0
0
SI
I have written a procedure that generates a HTML page cointaining data from a database. The user inputs the data to be written to the page usig a form.

Now I would like to create a button that opens the created web page for preview in IE.

I know how to do it using the shell function, however I have a problem. The path to Microsoft Internet Explorer is different on every computer in the company.

Is it possible to open the IE like it is possible to open Word and Excel by using the:
Shell("Microsoft Excel")
and not specifing the exact path.

10x in advance,

ElGuapo
 
yep Yep
First open a module and ad this under Option Explicit
On the Declarations page

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

then in a button put this code

Dim ProcessId As Long
GoInternet = "ProcessId = ShellExecute(hwnd, "open", GoInternet, "", "", 0)

;-) DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Hello again!

Your post was truly very helpful. Now I have encountred another problem. I would like to open two different files using the IE at the same time. If I use your function twice, the second it openes both of the files in the same window, so the first one opened cannot be viewed.

Thanks in advance!

Rok
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top