auto fill internet explorer

M

MaddyDread

I have a good feeling this is not possible, but is there a way to pass
information from an Excel user form, i.e.-username and password, into login
fields on a web site?
I currently have a command button which opens the site in IE, which is fine
for me (I don't mind typing in the info once I get there---and I know the
password by heart) but some of the users have a hard time remembering not
only the username/password, but where they have it written down, as well.
It doesn’t seem possible to me, considering I don’t know of any way to
specify where the information is supposed to go once the web page is open,
but I thought I’d post this just in case someone out there knows how to work
some magic.
 
R

ron

I have a good feeling this is not possible, but is there a way to pass
information from an Excel user form, i.e.-username and password, into login
fields on a web site?  
I currently have a command button which opens the site in IE, which is fine
for me (I don't mind typing in the info once I get there---and I know the
password by heart) but some of the users have a hard time remembering not
only the username/password, but where they have it written down, as well.
It doesn’t seem possible to me, considering I don’t know of any way to
specify where the information is supposed to go once the web page is open,
but I thought I’d post this just in case someone out there knows how towork
some magic.

Matty...Yes, this can be done. Here is a snippet of code that you
would put in your module to accomplish what you want

Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.Navigate "http://www.yourwebsite.com/"
.Top = 50
.Left = 530
.Height = 400
.Width = 400

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

' Make the desired selections on the Login web page and click the
submit button
Set ipf = ie.document.all.Item("username")
ipf.Value = "your username"

Set ipf = ie.document.all.Item("password")
ipf.Value = "your pw"
ie.document.all.Item("frmlogin").submit

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

End With


You will need to look at the source code behind the web page and find
out what terms they use for "username", password" and the login form.
If you post the url, I could be more specific...Ron
 
R

ron

Hi Ron,
Thanks for the response!  I haven't gotten a chance to try that out yet, but
the url ishttps://gateway.usps.com/bcg/login.htm

Thanks!!
--
Matty














- Show quoted text -

Matty...This should work for that url...ron

Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.Navigate "https://gateway.usps.com/bcg/login.htm"
.Top = 50
.Left = 530
.Height = 400
.Width = 400

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

' Make the desired selections on the Login web page and click the
' submit Button
Set ipf = ie.document.all.Item("login_name")
ipf.Value = "your username"

Set ipf = ie.document.all.Item("user_password")
ipf.Value = "your pw"

ie.document.all.Item("signIn").Click

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top