Refreshing web query that is password protected

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to refresh a web query that is located on a password protected
site. I am trying to use sendkeys to send the login and password to the
prompt that comes up (see below code). However the sendkey application is
not inputing the information into the prompt. Any ideas on how to fix this?

Application.SendKeys "LOGIN" & "{TAB}" & "PASSWORD" & "{ENTER}", True
Sheets("sheet1").QueryTables("14946_10").Refresh BackgroundQuery:=False
 
Craig,
If you know the format of the URL that is sent to the server when {ENTER}is
clicked, use .PostText to send that.
e.g. querytable.posttext="?Login=xxxx&Password=whatever"

Or something like that.

NickHK
 

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

Back
Top