W
Wild Bill
On a single worksheet I have a few cells in column B like
=FnHoursRemaining(A1)
Here's the UDF:
function FnHoursRemaining(strDate As String)
'sample input: Nov-25-07 20:16:49
FnHoursRemaining = 24 * (CDate(strDate) - Now)
end function
The function works. My question is how and why individual col. B cells
do or don't recalc on XL97 (feel free to report version differences;
this is all I'm running on this machine right now). Yes, calc is
automatic.
A. F9, alt-F9, and shift-F9 do nothing. I went Ctrl-A twice before doing
them. So EVERYTHING was selected.
B. Opening the file ("yes, enable macros") does NOT recalculate them.
C. F2 and enter key on individual cells seems to be the only way to
update the cells!!
1. I "get" that there is no volatility from Now as it's buried in the
function. But doesn't simply using a UDF make a worksheet volatile? If
so, shouldn't it recalculate?
2. What impact would application.volatile have here?
3. What in the wild world is up with result "A" above?! I keep pinching
myself to see a stupid user error/oversight. But it's really doing this.
I am reasonably familiar with range (cell) properties. Is the workbook
simply opening and sticking with .Value?
=FnHoursRemaining(A1)
Here's the UDF:
function FnHoursRemaining(strDate As String)
'sample input: Nov-25-07 20:16:49
FnHoursRemaining = 24 * (CDate(strDate) - Now)
end function
The function works. My question is how and why individual col. B cells
do or don't recalc on XL97 (feel free to report version differences;
this is all I'm running on this machine right now). Yes, calc is
automatic.
A. F9, alt-F9, and shift-F9 do nothing. I went Ctrl-A twice before doing
them. So EVERYTHING was selected.
B. Opening the file ("yes, enable macros") does NOT recalculate them.
C. F2 and enter key on individual cells seems to be the only way to
update the cells!!
1. I "get" that there is no volatility from Now as it's buried in the
function. But doesn't simply using a UDF make a worksheet volatile? If
so, shouldn't it recalculate?
2. What impact would application.volatile have here?
3. What in the wild world is up with result "A" above?! I keep pinching
myself to see a stupid user error/oversight. But it's really doing this.
I am reasonably familiar with range (cell) properties. Is the workbook
simply opening and sticking with .Value?