Coyote Level: Guest

|
Re: help Archived to Disk
Well maybe this will help. 8)
Here is a little project example code. Just open a new project, add two text boxes, add a check box and then add three option buttons to your Form1. Go to each option button and change the name of each to OptionFrance, OptionGermany, & OptionChina
Copy and paste the following code into Form1
' Code Starts Here ****************
Private Sub Check1_Click()
OptionFrance.Value = False
OptionGermany.Value = False
OptionChina.Value = False
Text2.Text = ""
End Sub
Private Sub Form_Load()
Text1.Text = Time
End Sub
Private Sub OptionFrance_Click()
Dim Adjust As Integer
Adjust = 1
If Check1.Value = Checked Then
Adjust = Adjust + 1
End If
Text2.Text = DateAdd("H", Adjust, Time)
End Sub
Private Sub OptionGermany_Click()
Dim Adjust As Integer
Adjust = 2
If Check1.Value = Checked Then
Adjust = Adjust + 1
End If
Text2.Text = DateAdd("H", Adjust, Time)
End Sub
Private Sub OptionChina_Click()
Dim Adjust As Integer
Adjust = 3
If Check1.Value = Checked Then
Adjust = Adjust + 1
End If
Text2.Text = DateAdd("H", Adjust, Time)
End Sub
' ********Code Ends ********
Only thing is..... I can't remember when you go on DayLight Saving Time is add or subtract an hour from the real time.(I added in the code ) Plus - this uses your computer time and if your already adjusted for Daylight Savings time then you may not have to adjust unless the country is not on daylight savings time.
SOoooooo you are going to probably have to check the date and hard code the dates to start and stop daylight savings time and do a check on the month and day. Guess I could help with that, but without some research on daylight savings time... Not much help now... all I know is Fall Back and Spring forward...
|