View Full Version : Excel 2013: handle Excel warning @ workbook opening: circular references

09-02-2015, 12:21 PM
I am using a circular reference to create static time stamps when data is entered or changed (the event) in a table.
The circular reference allows iteration, I set the iteration parameter step and count . . . and this all works fine once the workbook is open.

This file is to be used as a template and I want to avoid the Excel warning popping up and making users concerned about the circular reference activity.


I have tried to code into the workbook open event, but the error appears before this event is processed . . . or the code is ignored.

I have tried to send the escape key to acknowledge the warning pop-up automatically, but I need somehow to select the warning pop-up before sending the escape key to get this to acknowledge and close the warning.

How can I "Select" the Excel warning pop-up which occurs at wrokbook open and then send the escape key?

OR . . . anyone find a solution to preventing users having to acknowledge circular references built into the template file deliberately?

Thanks :think:

09-03-2015, 01:10 AM
welcome to the forum.


in Workbook_Open

Application.DisplayAlerts = False

09-03-2015, 07:23 AM
If you're using code anyway, I would remove the circular references and use a Change event to time stamp the relevant cells instead.

09-14-2015, 12:14 PM
Thank you Mancubus and Aflatoon for the replies.
The suggestion of using "application.displayalerts = false" does not counter the Excel warning for circular references because this warning appears before the application is allowing the workbook open code to run (apparently). Maybe I should have mentioned in my original post that I had tried that.

I was not aware of the scope and function of " change event " programing when I began to write the code. I will probably go back and use the "change event" method specifying ranges for the tables I am working with so that only changes in one column storing results will renew the timestamp for that data. It will be interesting to see if I can get all the same functionality with the change event method. The NOW() functionality is great at first until you realize the propensity of the function to update and refresh, and need to find a way to control the updating to occur only when desired.

For anyone needing TIME STAMPS for data entered it is worth noting that the better solution is likely to be to learn about the "Change Events" functionality to control when a value is gathered from a NOW() type function, rather than the iterative approach to only gather once (when iterative value is zero for example) and not again afterwards. I have learned that the monitored range for a change event action trigger can be limited to a specific table's column, and that the address of any cell which was changed can be returned so that the same row in another column can be updated (i.e. a Now() time stamp). The beauty of using tables is that column names can be programmed as the reference to find columns.

I have growing respect for the VBA community the more I need to use VBA to get things done, and want to express appreciation to the same community for sharing so that we all can learn and add value.