gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
I need to use a value in several places in my code, so I know I need to "DIM" it and set it, but I have no idea how.
In this formula
in this i am stating that CostRvw_C is where the value of the datediff formula goes
in another part of my code I want to use the same value of DateDiff("d", CostRvw_Planned, CostRvw_Actual).
how do I set the value of this formula so I can keep using it without rewriting it?
In this formula
Code:
Sub CostRvw_Planned_Vs_Actual()
'CostRvw10
If IsDate(CostRvw_Actual) And IsDate(CostRvw_Planned) Then
CostRvw_C = DateDiff("d", CostRvw_Planned, CostRvw_Actual)
End If
End Sub
in this i am stating that CostRvw_C is where the value of the datediff formula goes
in another part of my code I want to use the same value of DateDiff("d", CostRvw_Planned, CostRvw_Actual).
how do I set the value of this formula so I can keep using it without rewriting it?
Last edited: