If I have this code in an Excel VBA module:
Function MyFunc
MyFunc = (Range("A1".value) + 10
End function
And I enter in to any cell, lets say B2, in the spreadsheet:
=MyFunc()
I get returned in cell B2 the value in cell A1 plus 10. Which is good!
But, how can I programmatically recalculate the value in B2 when the value in A1 has changed? ie what is the code to refresh / recalculate the cells that use custom built functions?
TIA
Klopper
Function MyFunc
MyFunc = (Range("A1".value) + 10
End function
And I enter in to any cell, lets say B2, in the spreadsheet:
=MyFunc()
I get returned in cell B2 the value in cell A1 plus 10. Which is good!
But, how can I programmatically recalculate the value in B2 when the value in A1 has changed? ie what is the code to refresh / recalculate the cells that use custom built functions?
TIA
Klopper