Shweta
Well-known Member
- Joined
- Jun 5, 2011
- Messages
- 514
Hi All,
I have the below code to login into my gmail account and it is working fine. The problem with this code is it is opening the site in internet explorer but I want to open it in chrome.
Please help how to set the browser with vba code.
Thanks in advance!!
Regards,
Shweta
I have the below code to login into my gmail account and it is working fine. The problem with this code is it is opening the site in internet explorer but I want to open it in chrome.
Please help how to set the browser with vba code.
Code:
Sub test()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "http://www.gmail.com"
While IE.Busy
DoEvents 'wait until IE is done loading page.
Wend
IE.Document.all("Email").Value = "sss@gmail.com"
IE.Document.all("Passwd").Value = "abc"
IE.Document.all("signIn").Click
End Sub
Thanks in advance!!
Regards,
Shweta