salut le forum
Je fais des saisis avec un userform et chaque feuille du mois.
Je voudrais que chaque saisi se face dans une seul feuille a la suite avec le n° de semaine.
Voici le code le fichier et trop lourd.
Merci de votre aide.
Option Explicit
Private Sub Calendar1_Click()
txtDate.Value = ''
End Sub
Private Sub cmdEnvoi_Click()
Dim AA As Integer
AA = Month(txtDate) 'N° du mois de la date choisie
Dim i As Integer
Dim WSR As Worksheet
Set WSR = Sheets(AA)
i = WSR.Range('A65536').End(xlUp).Row + 1
WSR.Range('A' & i) = txtDate
WSR.Range('B' & i) = ComboBox1
' Format(xxxxxx,'# ##0,00 €') met la valeur saisie au format Euro
WSR.Range('C' & i) = Format(txtProduit, '## ##0.00 €')
WSR.Range('D' & i) = Format(txtNumC, '## ##0.00 €')
WSR.Range('E' & i) = Format(txtNumL, '## ##0.00 €')
WSR.Range('F' & i) = Format(txtNumB, '## ##0.00 €')
WSR.Range('G' & i) = Format(TextBox1, '## ##0.00 €')
Clean
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub Clean()
Dim CTRL As Control
For Each CTRL In Controls
If TypeOf CTRL Is MSForms.TextBox Then CTRL.Value = ''
Next CTRL
End Sub
Private Sub ComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
End Sub
Private Sub CommandCalendrier1_Click()
usfPos1.Show
End Sub
Private Sub CommandCalendrier_Click()
End Sub
Private Sub Label3_Click()
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
txtDate.Value = DateClicked
End Sub
Private Sub txtDate_Change()
txtDate = Calendar1
End Sub
Private Sub txtNumB_Change()
End Sub
Private Sub txtNumL_Change()
End Sub
Private Sub txtProduit_Change()
End Sub
Private Sub UserForm_Initialize()
txtDate = Date
End Sub