VBA function does not update when values change on Worksheet

  • I have written the following VBA function

    Where AR, CD0, and e are all assigned values i put in excel using Name Manager.
    The function works and everything, the only problem is that if I change the values of AR, CD0, or e in excel, the function does not update itself with the new values and displays the values using the old parameters. Is there a way I can have the function auto recalculate / auto update when the values of AR, CD0, or e have been changed in excel?

    ps.
    I have tried defining AR, CD0, and e in the code itself and changing it from there but it is not as efficient as if I had those values in excel. In excel I can add a scroll button / slide bar to allow for easy changes in those values. So if possible I would still like to keep the values of AR, CD0, and e defined in excel

    also ive included my excel fileforum.ozgrid.com/index.php?attachment/34277/

  • Re: VBA function does not update when values change on Worksheet


    Dtms1,

    While we welcome you to Ozgrid and thank you for providing a solution to your own problem which will help others in a similar situation. In future please take care to create thread titles that use Search Friendly Key Words. Your original title Any idea around this? would not have helped you find a thread that contained an answer and would not help another person with a similar problem find your solution.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!