Can someone please advice me on how to open a website using VBA code?

Aleng

New Member
Joined
Jul 27, 2010
Messages
37
Hi,

I want code to open a web page then enter a word in textbox(looks like password field...no user name req) then click on OK (which is submit).


Any help will be really appriciated.
Aleng.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
You can do it in this way:

Sub submit_form()
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate "http://www.somewhere.com"
While ie.busy
DoEvents
Wend
ie.Document.getElementById("password_textbox").Value = "secretpassword"
ie.Document.getElementById("submit_form").submit()
'or
ie.Document.getElementById("button_id").fireEvent("*******")
End Sub
I don't know why, but forum replaces "on click" (without space) with asterisks....
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,977
Members
449,200
Latest member
Jamil ahmed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top