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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

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