Consulting

Results 1 to 4 of 4

Thread: Excel 2013: handle Excel warning @ workbook opening: circular references

  1. #1

    Excel 2013: handle Excel warning @ workbook opening: circular references

    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.

    Circular Reference Warning.jpg


    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

  2. #2
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    welcome to the forum.

    http://www.jkp-ads.com/Articles/circ...ferences02.asp
    ?

    in Workbook_Open
    Application.DisplayAlerts = False
    ?
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  3. #3
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    If you're using code anyway, I would remove the circular references and use a Change event to time stamp the relevant cells instead.
    Be as you wish to seem

  4. #4
    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.

    Cheers!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •