+ Reply to Thread
Results 1 to 8 of 8

Cannot refer to a dynamic range in a closed workbook

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Cannot refer to a dynamic range in a closed workbook

    Hi Sir,

    After some search, I found that it is true that Excel will not accept a reference to a dynamic named range in a closed workbook. Otherwise, this will lead to such warning message as below:

    Microsoft Excel cannot find 'MIPS' on "Data.xlsx". There are two possible reasons:

    The name you specified may not be defined.
    The name you specified is defined as something other than a rectangular cell reference.
    Check the name and try again.

    My question is: how to use some Excel macro or available setting to suppress this kind of warning message?

    I have a file which is linked to the dynamic ranges of many external links. Every time this warning message pops up when there is such issue and I have to manually dismiss the warning message before the file update can continue. For this problem, I have to sit in front of the computer for 1 hour. Because the external files with dynamic ranges are made by my colleagues, I cannot change their file. The only thing I can do is to ask Excel to ignore these warning messages and just do the update as much as possible automatically.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Cannot refer to a dynamic range in a closed workbook

    Normaly in a macro the line
    Please Login or Register  to view this content.
    would block pop up messages but I'm a bit unsure since you have a file that is only linked to a number of other files and there is no macro involved in this, perhaps adding an auto open macro to your "master" file with the "displayalerts" line would work?

    Please Login or Register  to view this content.
    Alf

  3. #3
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: Cannot refer to a dynamic range in a closed workbook

    Hi Alf,

    Thanks a lot for the macro. I'll try to implement it.

    Can I ask: if I add the macro to ThisWorkbook, then all alert messages will be suppressed. In this case, when the master file is opened, will the master file be able to automatically updated with data from the external links? I hope the code Application.DisplayAlerts = False will not stop the master from being updated when opened?

    Thank you.

    Quote Originally Posted by Alf View Post
    Normaly in a macro the line
    Please Login or Register  to view this content.
    would block pop up messages but I'm a bit unsure since you have a file that is only linked to a number of other files and there is no macro involved in this, perhaps adding an auto open macro to your "master" file with the "displayalerts" line would work?

    Please Login or Register  to view this content.
    Alf

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Cannot refer to a dynamic range in a closed workbook

    I hope the code Application.DisplayAlerts = False will not stop the master from being updated when opened?
    No it will only block pop-up messages.

    Alf

  5. #5
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: Cannot refer to a dynamic range in a closed workbook

    Hi Alf,

    Thanks for your help. I am now trying to make it be implemented.

    In the Trust Center window, I need to select the option of 'Enable all Data Connections (not recommended)'. If otherwise, I select 'Prompt user about Data Connections', then I found the master file failed to be updated from external links (all external data remain the same as before), and also the ask-for-update-links window will not pop up as usual. In this case, can I ask if the choice of the option 'Enable all Data Connections (not recommended)' is absolutely needed to allow automatic update of all links?

    Besides, when the master file is opened, there is a message of Serurity Warning: Macros have been disabled. So the macro Auto_Open() will not run automatically, and I need to enable the macro by changing the setting. Is this right?

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Cannot refer to a dynamic range in a closed workbook

    So the macro Auto_Open() will not run automatically, and I need to enable the macro by changing the setting. Is this right?
    Yes that is correct.

    In "Trust Center Window" you need to set "Enable all Data Connections" but as soon as you have updated the links you could reset this to "Prompt user about Data Connections"

    Perhaps you also should add a scond macro to your master file

    Please Login or Register  to view this content.
    This will reset the the "DisplayAlerts" funtion to default state i.e. showing "Alerts"

    Alf

  7. #7
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Re: Cannot refer to a dynamic range in a closed workbook

    found this nice topic.

  8. #8
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: Cannot refer to a dynamic range in a closed workbook

    Thanks for your help, Alf. Very helpful and I'll shortly implement it to my file.

    Quote Originally Posted by Alf View Post
    Yes that is correct.

    In "Trust Center Window" you need to set "Enable all Data Connections" but as soon as you have updated the links you could reset this to "Prompt user about Data Connections"

    Perhaps you also should add a scond macro to your master file

    Please Login or Register  to view this content.
    This will reset the the "DisplayAlerts" funtion to default state i.e. showing "Alerts"

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Refer to a dynamic workbook in formula
    By dlow in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2013, 04:04 PM
  2. [SOLVED] Index Match to closed workbook - not dynamic?
    By brad999 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-01-2013, 08:19 AM
  3. [SOLVED] Sum dynamic range in closed workbook using address/match
    By jeffr27 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-14-2013, 10:15 AM
  4. Copy dynamic range from closed workbook
    By RedWing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2011, 07:11 PM
  5. refer to dynamic range in closed workbook with ADO
    By MattShoreson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2005, 06:26 AM

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