Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The argument, CompletionDate, is a reference to a cell (R7). I add 10 to
CompletionDate. Debug.Print, in both cases, displays the correct value but my cell (R7) is not updated. My function resides in cell U7 and it's value is returned correctly. What am I doing wrong? Thanks for the the help. Function SetCompletionDate(CompletionDate As Date) As Date ' Correct value for CompletionDate is displayed via debug.print Debug.Print "1:" & CompletionDate ' Correct value for CompletionDate is displayed via debug.print ' but the value on the spreadsheet is not changed CompletionDate = CompletionDate + 10 Debug.Print "2:" & CompletionDate ' Correct value is returned to the speadsheet SetCompletionDate = Now() + 10 End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ByRef vs ByVal | Excel Programming | |||
ByRef strangeness | Excel Programming | |||
byref errors | Excel Programming | |||
ByRef question | Excel Programming | |||
Is ByVal always better if ByRef isn't necessary | Excel Programming |