+ Reply to Thread
Results 1 to 4 of 4

Is there any VBA code to let Excel select a user-defined option from a pop-up window

  1. #1
    Registered User
    Join Date
    04-02-2007
    Posts
    2

    Is there any VBA code to let Excel select a user-defined option from a pop-up window

    I need the output from spreadsheet C, but C requires input values returned by running spreadsheets A & B in order. I use VBA code (Workbooks.Open) to open A & B, but they both contains links to other data sources. As soon as the workbooks are opened, there will be a pop-up window asking the user to choose between "Update data" and "Don't update", and the operation of my VBA code breaks down here. Is there any VBA code available to make Excel select the "Don't update" option automatically?

    (Since A & B contain some cell of same functions, I can't put them in one spreadsheet. I tried to rename functions in one of the spreadsheets, but then it failed to work)

  2. #2
    Registered User
    Join Date
    11-16-2006
    Posts
    80
    Hi,

    If your opening the workbook via code, try:

    Please Login or Register  to view this content.
    0 Doesn't update any references

    1 Updates external references but not remote references

    2 Updates remote references but not external references

    3 Updates both remote and external references

    Hope this helps,
    mccreaso

  3. #3
    Registered User
    Join Date
    04-02-2007
    Posts
    2
    Thanks a lot for your code. That was very helpful. I tried to open the spreadsheets A & B then run them by using the code
    Workbooks(“C:\Book A.xls”).Activate

    somehow it doesn't work for me.

  4. #4
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Please wrap your VBA code - see red link below fro instructions
    Please read forum rules - see blue link below
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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