If I create a LeaveDatedateTime property in a module and create a dateTime object in a method:
Var LeaveDate As New DateTime(Val(year(ArrayElement).Text),month(ArrayElement).listIndex,Val(day(ArrayElement).Text),Val(hr(ArrayElement).Text) + (12*AmPm(ArrayElement).listIndex),Val(minutes(ArrayElement).Text))
why would LeaveDate be nil when I attempt to use it in another method?
That’s because LeaveDate is defined in a method. So it only exists while this method runs – see Scope in the documentation.
In order to preserve it, the property must be saved in a place where it lives beyond the runtime of the method, like a module, window or class property.
Var in your code means a new private method property is created. If you have another property of the same name somewhere else, don’t use Var but address this property directly.
You did but you said you create it in a method. When the method returns, your locally declared variables (which live on the stack), go out of scope and are destroyed.