thenelson
asked on
Programmatically fill in an IE popup login form
I know how to fill in a login on a web page:
IE.Document.loginForm("use rname").Va lue = "1234"
IE.Document.loginForm("use rpassword" ).Value = "password"
Using VBA, how do I programmatically fill in the user name and password on a popup login form like the one in the attached image?
Screen-Capture.gif
IE.Document.loginForm("use
IE.Document.loginForm("use
Using VBA, how do I programmatically fill in the user name and password on a popup login form like the one in the attached image?
Screen-Capture.gif
ASKER
Thanks for the response. I will save send Keys as a last resort. Probably won't work here since I am keeping IE's visibility set to false.
Let's see if anyone else has a better idea. ...
Let's see if anyone else has a better idea. ...
How about simply encoding it as you would on the command line?
Substitute username & pw in the code.
Chris
Substitute username & pw in the code.
Chris
Sub Q24838887()
Dim strAddress As String
Dim objIE As Object
strAddress = "username:pw@ftp://thenelson.name"
On Error Resume Next
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = False
objIE.Navigate2 strAddress
'Need to get past logon page to test the links on the next page for workability
Do While objIE.readystate <> 4
DoEvents
Loop
objIE.Visible = True
End Sub
ASKER
thenelsonuser:Password@ftp://thenelson.name/
did not work. (I was so hopeful).
did not work. (I was so hopeful).
ASKER
Using that format on the command line:
"C:\Program Files\Internet Explorer\iexplore.exe" "thenelsonuser:Password@ftp://ftp.thenelson.name/"
also did not work. (did not find the website.)
"C:\Program Files\Internet Explorer\iexplore.exe" "thenelsonuser:Password@ftp://ftp.thenelson.name/"
also did not work. (did not find the website.)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
"ftp://thenelsonuser:Password@thenelson.name"
also did not work. It returned in IE:
FTP root at thenelson.name
To view this FTP site in Windows Explorer, click Page, and then click Open FTP Site in Windows Explorer
When I did that, I got the popup login again. Perhaps "ftp://username:pw@thenelson.name" worked with earlier versions of IE.
also did not work. It returned in IE:
FTP root at thenelson.name
To view this FTP site in Windows Explorer, click Page, and then click Open FTP Site in Windows Explorer
When I did that, I got the popup login again. Perhaps "ftp://username:pw@thenelson.name" worked with earlier versions of IE.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
rejoinder:
If you check 25651038 & 25651316 you will see that didn't work ;o)
Chris
If you check 25651038 & 25651316 you will see that didn't work ;o)
Chris
ASKER
For some reason
ftp://usernamehere:passwordhere@serveripaddresshere
didn't work then but does work now.
So I have one way to solve this. I guess I'll leave this open for a little longer to see if there is any other solution.
ftp://usernamehere:passwordhere@serveripaddresshere
didn't work then but does work now.
So I have one way to solve this. I guess I'll leave this open for a little longer to see if there is any other solution.
Glad to see that you are up and running.
Eee bah gum ... perhaps there was a typo or stray control character
Chris
Chris
ASKER
It was an FM circuit error:
One time I picked up an aircraft radio after repair, I asked the tech, "What was wrong with it?" He replied, "Probably something in the FM circuit." Confused, I asked,"Don't aircraft radios use AM?" He smiled and replied, "The 'M' stands for magic."
One time I picked up an aircraft radio after repair, I asked the tech, "What was wrong with it?" He replied, "Probably something in the FM circuit." Confused, I asked,"Don't aircraft radios use AM?" He smiled and replied, "The 'M' stands for magic."
I have a long background in the air force ... our experience with problems is it was usually the seat to stick interface at fault ... Now I simply have to hope you're not a pilot!
Chris
Chris
Never heard that one before, I like it!
ASKER
Thanks guys.
(I am a pilot.)
(I am a pilot.)
Oops! ;o)
Glad we got there in the end though I wish we knew what went wrong the first time.
Chris
Glad we got there in the end though I wish we knew what went wrong the first time.
Chris
set shell = createobject("wscript.shel
shell.sendkeys "username"
shell.sendkeys "{TAB}"
shell.sendkeys "password"
if you know the title of your window, try bringing it to front by:
success = shell.appactivate("Window Title)
if success then shell.sendkeys "....."
...
...