code vba

  • Initiateur de la discussion baigneur
  • Date de début
B

baigneur

Guest
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
 

Discussions similaires

Réponses
29
Affichages
1 K
Réponses
5
Affichages
282
Réponses
6
Affichages
333

Statistiques des forums

Discussions
312 964
Messages
2 094 008
Membres
105 912
dernier inscrit
willou3869