P
paul
How do I create a time variable and increment the
minutes. My attempt is incrementing the date instead of
the time. How could i get it to output: 11:00 11:20 etc?
Function Test()
Dim dteStartTime As Date
Dim dteEndTime As Date
Dim intMinIncrement As Integer
Dim dteNewTime As Date
dteStartTime = #11:00:00 AM#
dteEndTime = #3:00:00 PM#
intMinIncement = 20
dteNewTime = dteStartTime
Do Until dteStartTime > dteEndTime
dteNewTime = dteNewTime + intMinIncement
Debug.Print dteNewTime
Loop
End Function
minutes. My attempt is incrementing the date instead of
the time. How could i get it to output: 11:00 11:20 etc?
Function Test()
Dim dteStartTime As Date
Dim dteEndTime As Date
Dim intMinIncrement As Integer
Dim dteNewTime As Date
dteStartTime = #11:00:00 AM#
dteEndTime = #3:00:00 PM#
intMinIncement = 20
dteNewTime = dteStartTime
Do Until dteStartTime > dteEndTime
dteNewTime = dteNewTime + intMinIncement
Debug.Print dteNewTime
Loop
End Function