Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using WinXP Pro and Excel 2007;
I have the following UDF in a code module of a workbook Function LSDate() LSDate = Application.Caller.Parent.Parent. _ BuiltinDocumentProperties("Last Save Time").Value End Function Cell A1 =LSDate() The display date and time in the cell displays correctly when first the formula is first entered but it does not update unless I re-enter the formula. Automatic calculation is turned on. I've tried manually recalculating the worksheet. I've tried closing and reopening the worksheet. Any suggestions as to how I can get the cell to update automatically? Thank you. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could add a line at the top of the function:
Function LSDate() Application.Volatile .... And then your UDF will recalculate whenever excel recalculates. That means that you still may need to recalc before you believe the value in that cell. Bassman62 wrote: Using WinXP Pro and Excel 2007; I have the following UDF in a code module of a workbook Function LSDate() LSDate = Application.Caller.Parent.Parent. _ BuiltinDocumentProperties("Last Save Time").Value End Function Cell A1 =LSDate() The display date and time in the cell displays correctly when first the formula is first entered but it does not update unless I re-enter the formula. Automatic calculation is turned on. I've tried manually recalculating the worksheet. I've tried closing and reopening the worksheet. Any suggestions as to how I can get the cell to update automatically? Thank you. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave!
It works fine now. "Dave Peterson" wrote: You could add a line at the top of the function: Function LSDate() Application.Volatile .... And then your UDF will recalculate whenever excel recalculates. That means that you still may need to recalc before you believe the value in that cell. Bassman62 wrote: Using WinXP Pro and Excel 2007; I have the following UDF in a code module of a workbook Function LSDate() LSDate = Application.Caller.Parent.Parent. _ BuiltinDocumentProperties("Last Save Time").Value End Function Cell A1 =LSDate() The display date and time in the cell displays correctly when first the formula is first entered but it does not update unless I re-enter the formula. Automatic calculation is turned on. I've tried manually recalculating the worksheet. I've tried closing and reopening the worksheet. Any suggestions as to how I can get the cell to update automatically? Thank you. -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
=LSDate()+0*NOW() Should update when the file opens Might need F9 after saving and keeping the file open. Regards, Peter T "Bassman62" wrote in message ... Using WinXP Pro and Excel 2007; I have the following UDF in a code module of a workbook Function LSDate() LSDate = Application.Caller.Parent.Parent. _ BuiltinDocumentProperties("Last Save Time").Value End Function Cell A1 =LSDate() The display date and time in the cell displays correctly when first the formula is first entered but it does not update unless I re-enter the formula. Automatic calculation is turned on. I've tried manually recalculating the worksheet. I've tried closing and reopening the worksheet. Any suggestions as to how I can get the cell to update automatically? Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display constanlty updating time in a cell | Excel Discussion (Misc queries) | |||
how do i lock a cell? to save formula or function in it? | Excel Discussion (Misc queries) | |||
Updating a cell that uses a .NET add-in function | Excel Programming | |||
Cell showing the time auto updating | Excel Discussion (Misc queries) | |||
How can I disable the save function depending on one cell? | Excel Programming |