Kelvin Stott
Active Member
- Joined
- Oct 26, 2010
- Messages
- 338
Hello,
I have written a custom function in VBA that includes a random component, with VBAs RND function, but unfortunately it doesn't behave as a volatile function when I use it in my worksheet. For example, it doesn't automatically recalculate when I hit the delete key on a blank cell.
The best I have come up with is to use the following formula in my spreadsheet:
"= MyFunction() + 0*RAND()"
Is there any way to change the VBA code so that the function is volatile when I use it in a worksheet?
Thanks for any help,
Kelvin
I have written a custom function in VBA that includes a random component, with VBAs RND function, but unfortunately it doesn't behave as a volatile function when I use it in my worksheet. For example, it doesn't automatically recalculate when I hit the delete key on a blank cell.
The best I have come up with is to use the following formula in my spreadsheet:
"= MyFunction() + 0*RAND()"
Is there any way to change the VBA code so that the function is volatile when I use it in a worksheet?
Thanks for any help,
Kelvin