+ Reply to Thread
Results 1 to 4 of 4

Auto Login to Edit Web Query dialog

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Athens
    MS-Off Ver
    Excel 2010
    Posts
    2

    Auto Login to Edit Web Query dialog

    Hi all,

    I have inserted in a sheet a web connection.
    to refresh that connection I use the following macro:
    -------------
    Please Login or Register  to view this content.
    -------------

    it works beautifully but I need to login before I run this code.
    Currently this is manual by doing the 3 steps below.

    I would like a macro that emulates the following actions:

    1. Right click into "Sheet with connection to SF", select "Edit Query"
    2. enter username and password (taken from sheet "Credentials": user name in B1, Password in B2), click Login (NOT Import)
    3. Click Import

    there is no need for the user to see this process (it can happen on the background)

    I just need to push the button and refresh the data connection circumventing the login issue:
    if I am not logged in, log me in (execute the 3 steps) and refresh the data connection
    if I am logged in, (ignore the 3 steps) just refresh the data connection

    is this possible?
    (FYI: using excel 2010, Google chrome as default browser, but as this will be used by other people, it would be cool for the macro to work with all browsers)

    thank you very much in advance for your help.
    Last edited by arlu1201; 08-07-2012 at 08:39 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Auto Login to Edit Web Query dialog

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    Athens
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Auto Login to Edit Web Query dialog

    thanks for pointing that out
    Last edited by [email protected]; 08-10-2012 at 04:21 AM.

  4. #4
    Registered User
    Join Date
    01-02-2021
    Location
    United States
    MS-Off Ver
    O365
    Posts
    1

    Re: Auto Login to Edit Web Query dialog

    I know it's 8 years late, and you may not need it any more, but more for anyone in the future that may need it (like i did until i figured it out) - this should solve your problem


    Please Login or Register  to view this content.
    Last edited by M2021; 01-03-2021 at 02:37 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1