[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2006-11-29
2
Medium Priority
?
662 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1500 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 85
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

656 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