Visual Basic for Applications is the programming language provided with many Microsoft products such as Excel, Word and Visio. VBA is a robust programming language with a wide range of methods and functions. Opening a website from inside of an application like Excel is becoming more commonplace as the quantity of information stored in websites continues to grow. A practical use of opening a website from within an Excel spreadsheet would be to allow the user to view additional help information located on a webpage that pertains to that particular spreadsheet.
- Skill level:
- Moderately Easy
Other People Are Reading
Open the Microsoft Excel application from the "Start" button located on the Windows menu bar.
Open the macro menu by pressing the "Alt" and "F8" keys.
Enter "Browser" into the Macro name box and click on the "Create" button.
Paste the following code directly below the text "Browser":
Dim urlData As String Set Browser = CreateObject("InternetExplorer.Application") urlData = InputBox("Please enter URL") Browser.Navigate (urlData) Browser.Visible = True
Save the macro by pressing the "Ctrl" and "S" keys. Close the window titled "Microsoft Visual Basic" to return to the Excel application.
Open the macro menu by pressing the "Alt" and "F8" keys. Select the macro "Browser" and click on the button labelled "Run."
Enter the website to which you wish to navigate in the pop up box with the text "Please enter URL." Click on the button labelled "OK" and the website will display in a new Internet Explorer browser.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for