- Код: Выделить всё
Dim xday As Long
Dim xmonth As Long
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = Asc("Q") Then
End
End If
End Sub
Private Sub Form_Load()
xday = Weekday(Date, vbMonday)
If xday = 1 Then
Label1.Caption = "Понедельник"
End If
If xday = 2 Then
Label1.Caption = "Вторник"
End If
If xday = 3 Then
Label1.Caption = "Среда"
End If
If xday = 4 Then
Label1.Caption = "Четверг"
End If
If xday = 5 Then
Label1.Caption = "Пятница"
End If
If xday = 6 Then
Label1.Caption = "Суббота"
End If
If xday = 7 Then
Label1.Caption = "Воскресенье"
End If
xmonth = Mid(Date, 4, 2)
If xmonth = 1 Then
Label3.Caption = "Январь"
End If
If xmonth = 2 Then
Label3.Caption = "Февраль"
End If
If xmonth = 3 Then
Label3.Caption = "Март"
End If
If xmonth = 4 Then
Label3.Caption = "Апрель"
End If
If xmonth = 5 Then
Label3.Caption = "Май"
End If
If xmonth = 6 Then
Label3.Caption = "Июнь"
End If
If xmonth = 7 Then
Label3.Caption = "Июль"
End If
If xmonth = 8 Then
Label3.Caption = "Август"
End If
If xmonth = 9 Then
Label3.Caption = "Сентябрь"
End If
If xmonth = 10 Then
Label3.Caption = "Октябрь"
End If
If xmonth = 11 Then
Label3.Caption = "Ноябрь"
End If
If xmonth = 12 Then
Label3.Caption = "Декабрь"
End If
Label2.Caption = Left(Date, 2)
Label4.Caption = 2000 + Mid(Date, 7, 2) это год как сделать так чтобы писал не 04
End Sub
Кто может покажите ошибки плиииз!