by Carlos Martinez (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 21st February 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Take the range of week with the week of the year
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
'-----------------------------------------------------------------
'Date Developer Comments
'21/Feb/2002 Carlos Martinez Select Range of Week
'
'*****************************************************************
'=============================================
'Local Constant/Variable Declaration Section
'=============================================
Select Case KeyCode
Case vbKeyReturn
'Set Current Date to take the current year
Me.MonthView1.Value = Date
Me.MonthView1.Week = CInt(Me.Text1.Text)
Me.Text2.Text = Me.MonthView1.Value - (Me.MonthView1.DayOfWeek - 1)
Me.Text3.Text = Me.MonthView1.Value + (7 - Me.MonthView1.DayOfWeek)
End Select
End Sub