+ Reply to Thread
Results 1 to 8 of 8

bypass opening workbook prompts

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-14-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    133

    bypass opening workbook prompts

    When my macro opens a workbook, sometimes, it asks whether you want to update info, or save something.

    Usually, I would just click "Don't update" or just tab and enter.

    macro.JPGupdate.JPG

    My question is,

    1. Whats the macro code that can tab and enter for me?

    2. are they codes such as "save =false" that can bypass it directly?

  2. #2
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: bypass opening workbook prompts

    Did you try:

    Application.DisplayAlerts = False
    If solved kindly remember to mark Thread as solved.
    Click the small star icon at the bottom left of my post if this was useful.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,313

    Re: bypass opening workbook prompts

    The enable macros confirmation dialogue is part of the security process in Excel. The options are to set the Security Level to low (not recommended), digitally sign the workbook, or save the workbook to a "trusted location".

    With regard to updating links:

    Workbooks.Open Method
    http://msdn.microsoft.com/en-us/libr.../ff194819.aspx


    UpdateLinks
    Specifies the way external references (links) in the file, such as the reference to a range in the Budget.xls workbook in the following formula =SUM([Budget.xls]Annual!C10:C25), are updated. If this argument is omitted, the user is prompted to specify how links will be updated. For more information about the values used by this parameter, see the Remarks section. If Microsoft Excel is opening a file in the WKS, WK1, or WK3 format and the UpdateLinks argument is 0, no charts are created; otherwise Microsoft Excel generates charts from the graphs attached to the file
    You can specify one of the following values in the UpdateLinks parameter to determine whether external references (links) are updated when the workbook is opened.

    Value Meaning
    0 External references (links) will not be updated when the workbook is opened.
    3 External references (links) will be updated when the workbook is opened.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: bypass opening workbook prompts

    you shouldn't generally see macro prompts if you are opening a workbook with code (since you're already running code!) but for the links you can use
    workbooks.open filename:="some file.xls", updatelinks:=false
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Forum Contributor
    Join Date
    04-14-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: bypass opening workbook prompts

    I am faced with a further similar problem. The file I need to copy data from is already opened. Which means, I can either,

    1. activate it. with

    Workbooks("FILE311012.xls").Activate

    problem is, filename is not static. i have created a dynamic cell that contains filename in A1, so i tried

    Workbooks("A1").Activate

    no luck

    Alternatively

    2. I can use a command to reopen it. but a prompt comes up in which i dnt know how to bypass, see attached.
    Last edited by slxia1; 10-30-2012 at 09:10 PM. Reason: further problem

  6. #6
    Forum Contributor
    Join Date
    04-14-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: bypass opening workbook prompts

    already opened.JPG

    attached for above comment

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,313

    Re: bypass opening workbook prompts

    That doesn't seem to be a "similar" question to me.

    Whatever, try:

    Workbooks(Range("A1")).Activate

    Regards, TMS

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,313

    Re: bypass opening workbook prompts

    Thanks for the rep.

+ 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