+ Reply to Thread
Results 1 to 7 of 7

VB Script to Select a Prompt Button

  1. #1
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    VB Script to Select a Prompt Button

    Hello, I am trying to come up with some code to Refresh All Data on my Workbook.

    I have this bit of code:

    ActiveWorkbook.RefreshAll

    However, this causes a prompt on screen for the End User to select a button labelled "Import"

    Is there a Code that could select this button automatically?

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VB Script to Select a Prompt Button

    can't say I can test on this occasion but perhaps:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: VB Script to Select a Prompt Button

    Hi thanks for your response. I tried that but unfortunately it still prompts me to click Import

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VB Script to Select a Prompt Button

    So I guess the next question is - what's generating the Import dialog - is it another sub routine ?

    (I should add I'm kinda guessing here... we need some people who do lots of external data queries...)

  5. #5
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: VB Script to Select a Prompt Button

    Hi, I am Refreshing All Data from External Data (CSV Files)

    When I do a Refresh All, the prompt is asking for me to click "Import" to import the CSV file. There are 3 in total so I am getting 3 prompts.

    The VB Code above still displays the 3 prompts

    Kind regards,
    Tom

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VB Script to Select a Prompt Button

    Tom, can you not edit each connection and disable the prompt via Properties ?

    Which version are you running - 2003 as implied ?

  7. #7
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: VB Script to Select a Prompt Button

    I feel silly haha - I've checked and you are correct, I can disable the prompt via properties!

    Thanks DonekeyOte

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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