0% found this document useful (0 votes)
104 views

Connecting To Internet Using Ms-Excel Vba Macro

This sample code provides an example of how you can connect to a web browser and to a website using VBA which is the programming engine behind Microsoft Excel applications. Once you are connected you can use a variety of functions entering data into the webpage automatically using the data available in excel or vice-versa i.e storing data available in the web page into MS-Excel. You can even navigate across pages automatically. This sample program connects to an instance of internet explorer(precisely v7) and opens up a sample site called example.com. Though the actions vary from browser to browser, the idea is that you can indeed connect to the internet and do client side data processing pretty automatically only limited by your imagination.

Uploaded by

balu435
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views

Connecting To Internet Using Ms-Excel Vba Macro

This sample code provides an example of how you can connect to a web browser and to a website using VBA which is the programming engine behind Microsoft Excel applications. Once you are connected you can use a variety of functions entering data into the webpage automatically using the data available in excel or vice-versa i.e storing data available in the web page into MS-Excel. You can even navigate across pages automatically. This sample program connects to an instance of internet explorer(precisely v7) and opens up a sample site called example.com. Though the actions vary from browser to browser, the idea is that you can indeed connect to the internet and do client side data processing pretty automatically only limited by your imagination.

Uploaded by

balu435
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

C:\Documents and Settings\Balasubramaniam\My Documents\VBA_Internet.

txt

Sunday, January 20, 2013 10:30 AM

CONNECTING TO INTERNET USING MS-EXCEL VBA MACRO This sample code provides an example of how you can connect to a web browser and to a website using VBA which is the programming engine behind Microsoft Excel applications. Once you are connected you can use a variety of functions entering data into the webpage automatically using the data available in excel or vice-versa i.e storing data available in the web page into MS-Excel. You can even navigate across pages automatically. This sample program connects to an instance of internet explorer(precisely v7) and opens up a sample site called example.com. Though the actions vary from browser to browser, the idea is that you can indeed connect to the internet and do client side data processing pretty automatically only limited by your imagination. Private Sub CommandButton1_Click() Dim IeBro As InternetExplorer Dim IeDoc As HTMLDocument Dim asdf As HTMLDialog Dim a As Integer ' Declare variables if you want to process data Set IeBro = CreateObject("InternetExplorer.Application") IeBro.Visible = True 'Ist page of the Webpage start1: With IeBro .AddressBar = False .StatusBar = False .MenuBar = False .Toolbar = 0 .Visible = True .Navigate "http://example.com" End With While IeBro.Busy Wend While IeBro.Document.ReadyState <> "complete" 'look for the status message in your browser - can vary with browser Wend Set IeDoc1 = IeBro.Document On Error GoTo 10 ' Call error code IeBro.Quit End Sub

-1-

You might also like