bryanbayfield
Technical User
OK dudes, riddle me this.
Volatile functions, VBA help:
[tt]Marks a user-defined function as volatile. A volatile function must be recalculated whenever calculation occurs in any cells on the worksheet.[/tt]
I've marked my function as volatile - it is used on sheet 3, and takes two arguments - one is a reference to a range on sheet 3, the other is a byte.
The function uses range values on sheet 1 to come up with an answer. I have coded for the worksheet change event, just one line for when the worksheet changes, the value in sheet 4 changes, this value in sheet 4 serves as an indicator variable. If it is true then the user is asked whether they want to recalculate.
Given the above, I am perplexed as to why when I change values in sheet 1, sheet 3 automatically recalculates (I have two windows open on the workbook). Is the Excel help file incorrect (!), and should it actually read "whenever a change occurs on any cell in the workbook".
I am perplexed because, there is no direct dependency between sheet 1 values and the worksheet formulae in sheet 3, but there is a depeny between sheet 1 values and teh coding for the user-defined functions that are in sheet 3.
Irritating.
Volatile functions, VBA help:
[tt]Marks a user-defined function as volatile. A volatile function must be recalculated whenever calculation occurs in any cells on the worksheet.[/tt]
I've marked my function as volatile - it is used on sheet 3, and takes two arguments - one is a reference to a range on sheet 3, the other is a byte.
The function uses range values on sheet 1 to come up with an answer. I have coded for the worksheet change event, just one line for when the worksheet changes, the value in sheet 4 changes, this value in sheet 4 serves as an indicator variable. If it is true then the user is asked whether they want to recalculate.
Given the above, I am perplexed as to why when I change values in sheet 1, sheet 3 automatically recalculates (I have two windows open on the workbook). Is the Excel help file incorrect (!), and should it actually read "whenever a change occurs on any cell in the workbook".
I am perplexed because, there is no direct dependency between sheet 1 values and the worksheet formulae in sheet 3, but there is a depeny between sheet 1 values and teh coding for the user-defined functions that are in sheet 3.
Irritating.