|
|
|
|
|
|
Multiple Apps
|
Programatically call Internet Explorer and link to web-site
|
|
Ease of Use
|
Easy
|
Version tested with
|
2000
|
Submitted by:
|
johnske
|
Description:
|
After running the code, IE opens at the requested web-site
|
Discussion:
|
You may have a program that requires you to open a web-page for a given set of circumstances such as - for help (or additional help) on a topic - when the user should download something to proceed further - or whatever. This procedure can be called when those circumstances are met...
|
Code:
|
instructions for use
|
Option Explicit
Sub BeamMeUpScotty()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
On Error GoTo 1
With ie
.navigate "http://www.vbaexpress.com/"
.Visible = True
End With
Set ie = Nothing
Exit Sub
1: MsgBox Err.Description
ie.Quit
Set ie = Nothing
End Sub
|
How to use:
|
- Open the application (Excel, Word, Outlook)
- Select Tools/Macro/Visual Basic Editor
- In the VBE window, select Insert/Module
- Copy and paste the code into the Module
- Now select File/Close and return to the main application
- Dont forget to save your changes...
|
Test the code:
|
- In the applications main window, select Tools/Macro/Macros.../BeamMeUpScotty/Run
|
Sample File:
|
UsingIEprogramatically.zip 6.03KB
|
Approved by mdmackillop
|
This entry has been viewed 212 times.
|
|