Hi Everyone
I have a couple of code for Auto login web pages and it all should be open in new Tab not New IE Window..
In this code i got Object error .. can any one help me to solve this.
Thanks in Advance.
I have a couple of code for Auto login web pages and it all should be open in new Tab not New IE Window..
In this code i got Object error .. can any one help me to solve this.
Code:
Sub ssss()
Dim IE As Object
With CreateObject("Shell.Application").Windows
If .Count > 0 Then
Set IE = .Item(0)
Else
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
End If
Do Until Not IE.busy And IE.readyState = 4
DoEvents
Loop
With IE
.Navigate "https://mail.google.com" ' for Example
.Document.getElementById("userNameInput").Value = Sheets("Portal").Range("C79").Value
.Document.getElementById("passwordInput").Value = Sheets("Portal").Range("B20").Value
.Document.getElementById("submitButton").Click
End With
Do Until Not IE.busy And IE.readyState = 4
DoEvents
Loop
Set IE = Nothing
End With
End Sub