Hello,
I have hyperlinks in my excel file that I want to open individually when I need to. The website requires a Login an Password. I use VBA to login to the website an then when I want to navigate to a hyperlink it takes me back to the login page.
Is there a way that I can open the hyperlink and keep the login/password.
Is it possible to somehow use .Navigate with the hyperlink instead of "clicking on the cell that contains the hyperlink" through VBA?
I have hyperlinks in my excel file that I want to open individually when I need to. The website requires a Login an Password. I use VBA to login to the website an then when I want to navigate to a hyperlink it takes me back to the login page.
Is there a way that I can open the hyperlink and keep the login/password.
Is it possible to somehow use .Navigate with the hyperlink instead of "clicking on the cell that contains the hyperlink" through VBA?
VBA Code:
Sub Core_Closure_Date()
' Navigate to Login Page
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
.Navigate "https://secure.corporate_website.jsp"
Do While IE.ReadyState <> READYSTATE_COMPLETE
Loop
.Document.all.Item("UserName").Value = "********"
.Document.all.Item("Password").Value = "******"
.Document.querySelector("button[Class='ui-state-default']").Click
Do Until IE.ReadyState = 4: DoEvents: Loop
' Navigate to Hyperlink
With IE
.Visible = True
ActiveCell.Select
ActiveCell.Offset(0, 21).Select
ActiveCell.Hyperlinks(1).Follow
End With
End With
End Sub