1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| '**bouton modifier par rapport à la comobox5
Private Sub CommandButton2_Click()
Dim lig As Integer
If ComboBox5 = "" Then
MsgBox ("Veuillez sélectionner un nom dans la liste recherche !")
Exit Sub
End If
If MsgBox("Confirmez-vous ces modifications ?", vbYesNo, "Demande de confirmation") = vbNo Then
Exit Sub
Else
With Sheets("Coordonnées") ' feuille ou sont mes infos
lig = .Columns("B").Find(What:=Label19, after:=Range("B3"), Lookat:=xlWhole).Row ' chercher dans la colonne B , mon élément de référence
.Cells(lig, "C").Value = Application.Proper(Me.ComboBox1) ' va porter les infos sur la bonne ligne
'.Cells(lig, "D") = ComboBox5
.Cells(lig, "E") = UCase(Me.ComboBox2)
.Cells(lig, "F") = Application.Proper(Me.ComboBox3)
.Cells(lig, "G") = UCase(Me.ComboBox4)
.Cells(lig, "H") = CDate(Me.TextBox3)
.Cells(lig, "I") = CDate(Me.TextBox4)
.Cells(lig, "J") = (Me.TextBox5)
.Cells(lig, "K") = (Me.TextBox6)
.Cells(lig, "L") = (Me.TextBox8)
.Cells(lig, "M") = UCase(Me.TextBox7)
.Cells(lig, "N") = Format(Me.TextBox9.Value, "00"".""00"".""00"".""00"".""00")
.Cells(lig, "O") = (Me.TextBox10)
.Cells(lig, "P") = (Me.TextBox11)
End With
RAZ 'efface tout
MsgBox "Les modifications ont bien été effectuées."
End If
If MsgBox("Souhaitez-vous effectuer une nouvelle modification ?", vbYesNo, "Demande de confirmation") = vbYes Then
Unload Me
UF_Enregistrement.Show
Else
Fermer_UFEnregistrement
End If
End Sub |
Partager