I am having trouble looping through a date set. Is this something that is tricky? The main issue is I can't get the simplest portion which seems odd - basically setting the begin date variable.
Here is my code any help would be appreciated!! I've tried this as a date variable and variant.
Dim VarDate As Date
Dim enddate As Date
vardate = #12/31/2010#
enddate = #1/1/2011#
Do While VarDate < enddate
VarDate = DateAdd("D", 1, VarDate)
debug.print Vardate
Loop
Right now the code is not supposed to do more than simply loop through from 12/31/2010 until it reaches the enddate at 12/31/2011. I have no problems with the enddate, but the begin date starts in June for some odd reason. We use a Citrix system here, no PCs...I am wondering if it has something to do with that. Or is looping through dates something that requires extra care?
Here is my code any help would be appreciated!! I've tried this as a date variable and variant.
Dim VarDate As Date
Dim enddate As Date
vardate = #12/31/2010#
enddate = #1/1/2011#
Do While VarDate < enddate
VarDate = DateAdd("D", 1, VarDate)
debug.print Vardate
Loop
Right now the code is not supposed to do more than simply loop through from 12/31/2010 until it reaches the enddate at 12/31/2011. I have no problems with the enddate, but the begin date starts in June for some odd reason. We use a Citrix system here, no PCs...I am wondering if it has something to do with that. Or is looping through dates something that requires extra care?