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:

  1. Open the application (Excel, Word, Outlook)
  2. Select Tools/Macro/Visual Basic Editor
  3. In the VBE window, select Insert/Module
  4. Copy and paste the code into the Module
  5. Now select File/Close and return to the main application
  6. Dont forget to save your changes...
 

Test the code:

  1. 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.

Please read our Legal Information and Privacy Policy
Copyright @2004 - 2020 VBA Express