title: Data Import With Login
body: <p>I'm looking to create a macro for my office. This macro imports data from websites using the  <code>With ActiveSheet.QueryTables.Add(Connection:=</code> code. </p>
  
  <p>The issue is that anyone who uses this macro will need to sign into the website I am trying to reach. Since I am using the Query command, the query requires the login, and not the IE object. </p>
  
  <p>Right now, I have people go to the data ribbon and clicking "from web" to load the website up and sign in that way, then exiting it and running the macro. This allows the Query to reach the login cookies and the code runs fine. I need a way to streamline this so it's not so complicated.</p>
  
  <p>Right now, I have a userbox that loads when the worksheet is opened that allows users to enter in their user login and password. Then this userbox saves that information in a different sheet. </p>
  
  <p>I'm looking for a way to use the information they entered to "login" to the query import because having users go to the data ribbon is just a pain in the butt for everybody; and just makes my code look sloppy. Is there a way to login to a query website automatically? </p>
  
  <p>*Even if I automate the login from an IE Application, the query still asks for a login. This makes me think that the cookies stored from IE and the query language are separate. </p>