SteveW
August 22nd, 2001, 02:14 PM
Here is an odd occurance. I am creating a time sheet in excel and using some of the visual basic commands in the background.
Here is the breakdown:
Enter the date and press return.
Next 2 weeks worth of dates appear on the excel form.
As soon as i press enter for the date, the sytem date is changed to match the date that i just entered. (System date is the date on my taskbar).
Any tips on avoiding this problem?
Thank You in advance.
Here is my code:
Private Sub cmdEnter_Click()
Date = txtDate.Value
lblSunDate1.Caption = Date
lblMonDate1.Caption = Date + 1
lblTueDate1.Caption = Date + 2
lblWedDate1.Caption = Date + 3
lblThuDate1.Caption = Date + 4
lblFriDate1.Caption = Date + 5
lblSatDate1.Caption = Date + 6
lblSunDate2.Caption = Date + 7
lblMonDate2.Caption = Date + 8
lblTueDate2.Caption = Date + 9
lblWedDate2.Caption = Date + 10
lblThuDate2.Caption = Date + 11
lblFriDate2.Caption = Date + 12
lblSatDate2.Caption = Date + 13
End Sub
Here is the breakdown:
Enter the date and press return.
Next 2 weeks worth of dates appear on the excel form.
As soon as i press enter for the date, the sytem date is changed to match the date that i just entered. (System date is the date on my taskbar).
Any tips on avoiding this problem?
Thank You in advance.
Here is my code:
Private Sub cmdEnter_Click()
Date = txtDate.Value
lblSunDate1.Caption = Date
lblMonDate1.Caption = Date + 1
lblTueDate1.Caption = Date + 2
lblWedDate1.Caption = Date + 3
lblThuDate1.Caption = Date + 4
lblFriDate1.Caption = Date + 5
lblSatDate1.Caption = Date + 6
lblSunDate2.Caption = Date + 7
lblMonDate2.Caption = Date + 8
lblTueDate2.Caption = Date + 9
lblWedDate2.Caption = Date + 10
lblThuDate2.Caption = Date + 11
lblFriDate2.Caption = Date + 12
lblSatDate2.Caption = Date + 13
End Sub