Solved

How to send username and password to a secured website using VBA

Posted on 2006-11-29
2
647 Views
Last Modified: 2008-03-17
Dear Experts,

I'm trying to pass a username and password to a secured website using ms access.
I have tried passing the values in the URL (stURL = "Http://" & stSUser & ":" & stSPass & "@" & stURL_Root) and tried to pass the values using SendKeys while Internet Explorer has the focus.
In the first case (passing values in URL) IE returns the "Page cannot be displayed" error, while username and password are correct.
In the second case the logon dialog opens but the username is not pasted into the Dialog box :

On Error Resume Next
    Set Ie = CreateObject("InternetExplorer.Application")
        With Ie
           .Navigate stURL_Root
           .Visible = True
     End With
Sendkey stPaste 'string for userid has been copied to the clipboard

Can anybody help me with this issue?

Thanks and regards, Johan
0
Comment
Question by:jrameuwissen
  • 2
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 18035799
Does the website support passing the username and password in the URL? If so, you'd need to contact them to find out the exact syntax to use, but most sites that do support this use syntax like this:

http:\\www.website.com?username=scott&password=mcdaniel

or something similar.

If you're trying to "automate" the webpage and add your username and password via VBA, then the short answer is you really cannot do this. There is no way to automate a webpage, except through methods exposed by the webpage ...
0
 
LVL 84
ID: 18049553
Can I ask why a B? You haven't replied to this, and the comment I provided was pretty exact ... you might not like the answer, but the answer is correct.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now