bonjour
j ai perdu ce code
Sub maj() avez vous un lien merci
date1 = CDate("01 " & UserForm2.ComboBox1.Value & " " & UserForm2.TextBox1.Value)
date2 = date1
joursem = Weekday(date1)
For J = 2 To 43
Set c = UserForm2.Controls(J)
c.Visible = True
If Len(c.Name) = 14 And CInt(Right(c.Name, 1)) <= joursem Then
c.Visible = False
Else
If Month(date1) = Month(date2) Then
c.Caption = Day(date1)
Else
c.Visible = False
End If
date1 = date1 + 1
End If
Next
End Sub
Sub affcalendar()
UserForm2.Show
End Sub
Sub affdate()
If Len(UserFor2.ActiveControl.Name) = 14 Then
jour1 = Right(UserForm2.ActiveControl.Caption, 1)
Else
jour1 = Right(UserForm2.ActiveControl.Caption, 2)
End If
mois1 = UserForm2.ComboBox1.Value
an1 = UserForm2.TextBox1.Value
'ActiveCell.Value = CDate(jour1 & " " & mois1 & " " & an1)
UserForm2.txtDate.Value = CDate(jour1 & "/" & mois1 & "/" & an1)
' UserForm1.Hide
End Sub
j ai perdu ce code
Sub maj() avez vous un lien merci
date1 = CDate("01 " & UserForm2.ComboBox1.Value & " " & UserForm2.TextBox1.Value)
date2 = date1
joursem = Weekday(date1)
For J = 2 To 43
Set c = UserForm2.Controls(J)
c.Visible = True
If Len(c.Name) = 14 And CInt(Right(c.Name, 1)) <= joursem Then
c.Visible = False
Else
If Month(date1) = Month(date2) Then
c.Caption = Day(date1)
Else
c.Visible = False
End If
date1 = date1 + 1
End If
Next
End Sub
Sub affcalendar()
UserForm2.Show
End Sub
Sub affdate()
If Len(UserFor2.ActiveControl.Name) = 14 Then
jour1 = Right(UserForm2.ActiveControl.Caption, 1)
Else
jour1 = Right(UserForm2.ActiveControl.Caption, 2)
End If
mois1 = UserForm2.ComboBox1.Value
an1 = UserForm2.TextBox1.Value
'ActiveCell.Value = CDate(jour1 & " " & mois1 & " " & an1)
UserForm2.txtDate.Value = CDate(jour1 & "/" & mois1 & "/" & an1)
' UserForm1.Hide
End Sub