Solved

Shell to IE

Posted on 2006-11-01
2
152 Views
Last Modified: 2010-04-30
I need to shell to IE within a VB app. Some caveats:

1) IE will not always be the default browser, so ShellExecute API will not always work.
2) The path to iexplore.exe may not always be in the environment PATH variable so SHELL("iexplorer.exe") may produce a file not found error.
3) Although more than likely so, I do not know if I can always count on iexplore.exe being in the directory C:\Program Files\Internet Explorer\ (not on C drive, not in the directory Internet Explorer...)

I do not want to initiate a search every time to find it. Is there a way (reading a specific registry key, etc.) that I can find it. Since it is such an integral part of M$ operating system, you whould think its location would be engraved in stone somewhere.

Doug
0
Comment
Question by:dbbishop
2 Comments
 
LVL 13

Accepted Solution

by:
jmundsack earned 250 total points
ID: 17852683
Try this:

Public Sub Main()
    Dim oIE As Object
    Set oIE = CreateObject("InternetExplorer.Application")
    MsgBox oIE.Path
End Sub

HTH-Jon
0
 
LVL 15

Author Comment

by:dbbishop
ID: 17852758
I went ahead and used FullName property, with includes the path and the application name. Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel VBA combine two working workbooks 8 46
using Access 8 58
using web browser with BING 40 110
Hide vba in gp 7 80
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now