Hi,
I've been struggling with a problem for a number of days and would appreciate any help that could be offered. Extensive use of google is not alleviating my pain...
I have a VBA project in Excel that is storing parameters for some network equipment and presenting them in a series of userforms. Within the userforms I have some features such as ping to allow a support guy to check if the node is still alive. I also have a "Open Browser" command button that opens an IE instance and browses to the management UI of the network node. This is where the problems occur. The web UI requires a user name and password entering (basic authentication) in a popup window.
To achieve this I am using the following code:
________________________________________________________________________
Sub OpenBrowser()
Dim ie As InternetExplorer
Set ie = New InternetExplorer
Dim Header As String
Dim url As String
Header = "Authorization: Basic XXXXXXXXXXXXXX" & Chr$(13) & Chr$(10)
url = "http://10.10.3.2/"
With ie
.Navigate2 url, Nothing, Nothing, Nothing, Header
.Visible = True
Do Until ie.readyState = 4
DoEvents
Loop
End With
End Sub
_____________________________________________________________________
In so far as this goes it works fine, except I have been running packet captures (wireshark) to check the navigate2 command was adding the authorization header correctly, which it does.
The problem is that after launch from excel, every following HTTP GET from IE to the webUI has to have the authorization credentials in them. Hence when IE is launched you are prompted to enter the user / pw in another popup box for each frame in the browser window. It would appear that the instance of IE is not caching the details and submitting them with each GET.
Is anyone aware of a way of overcoming this issue and parsing the credentials from the Excel project to IE for the entire session?
I appreciate that this isn't the normal Excel / VBA problem so if it is deemed to be in the wrong forum then thats fine with me, but I would appreciate anyones advice.
If anyone requires further information then please don't hesitate to ask.
Thanks for your time. Cheers
Matt
I've been struggling with a problem for a number of days and would appreciate any help that could be offered. Extensive use of google is not alleviating my pain...
I have a VBA project in Excel that is storing parameters for some network equipment and presenting them in a series of userforms. Within the userforms I have some features such as ping to allow a support guy to check if the node is still alive. I also have a "Open Browser" command button that opens an IE instance and browses to the management UI of the network node. This is where the problems occur. The web UI requires a user name and password entering (basic authentication) in a popup window.
To achieve this I am using the following code:
________________________________________________________________________
Sub OpenBrowser()
Dim ie As InternetExplorer
Set ie = New InternetExplorer
Dim Header As String
Dim url As String
Header = "Authorization: Basic XXXXXXXXXXXXXX" & Chr$(13) & Chr$(10)
url = "http://10.10.3.2/"
With ie
.Navigate2 url, Nothing, Nothing, Nothing, Header
.Visible = True
Do Until ie.readyState = 4
DoEvents
Loop
End With
End Sub
_____________________________________________________________________
In so far as this goes it works fine, except I have been running packet captures (wireshark) to check the navigate2 command was adding the authorization header correctly, which it does.
The problem is that after launch from excel, every following HTTP GET from IE to the webUI has to have the authorization credentials in them. Hence when IE is launched you are prompted to enter the user / pw in another popup box for each frame in the browser window. It would appear that the instance of IE is not caching the details and submitting them with each GET.
Is anyone aware of a way of overcoming this issue and parsing the credentials from the Excel project to IE for the entire session?
I appreciate that this isn't the normal Excel / VBA problem so if it is deemed to be in the wrong forum then thats fine with me, but I would appreciate anyones advice.
If anyone requires further information then please don't hesitate to ask.
Thanks for your time. Cheers
Matt