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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| Private Sub CB_Modifier2_Click()
Comment.CB_Modif.Visible = True
'--------------------------Récupère la Date de la Modification ------------------------
ActiveSheet.Unprotect
If ActiveCell.Interior.ColorIndex = xlNone Then
ActiveCell.UnMerge 'Supprime fusionner les cellules
AD = ActiveCell.Address
Worksheets("Commandes").Select
With Sheets("Commandes")
'Chercher son nom dans la feuille Conso colonne B
Set c = .Range("A3:A" & .Cells(.Rows.Count, 1).End(xlUp).Row).Find( _
What:=AD, _
After:=.Range("A3"), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
Columns(1).Find(AD, , , , , Previous).Select
Comment.Lab_CodeCde = ActiveCell
Comment.Lab_CodRetCde = ActiveCell.Offset(0, 1)
' Date Cde et Retour
Comment.DTPicker1 = ActiveCell.Offset(0, 2)
Comment.DTPicker2 = ActiveCell.Offset(0, 3)
' Entreprise
If ActiveCell.Offset(0, 4) = "AGLM" Then
Comment.OpB_AGLM = True
Else
Comment.OpB_ASM = True
End If
' Client
Comment.TB_Clients = ActiveCell.Offset(0, 5)
Comment.TB_Ville = ActiveCell.Offset(0, 6)
Comment.TB_Horaire = ActiveCell.Offset(0, 7)
Comment.TB_Commentaires = ActiveCell.Offset(0, 8)
' Chapiteaux
Comment.TB3 = ActiveCell.Offset(0, 9)
Comment.TB4 = ActiveCell.Offset(0, 10)
Comment.TB5 = ActiveCell.Offset(0, 11)
Comment.TB6 = ActiveCell.Offset(0, 12)
Comment.TB_P3x3 = ActiveCell.Offset(0, 13)
Comment.TB_P3x45 = ActiveCell.Offset(0, 14)
Comment.TB_P3x6 = ActiveCell.Offset(0, 15)
Comment.TB_GS = ActiveCell.Offset(0, 16)
Comment.TB_Hexa = ActiveCell.Offset(0, 17)
' Reference Chapiteaux
Comment.LB_RefChap = ActiveCell.Offset(0, 18)
End With
End If
Comment.TB_RefChap.Visible = True
Comment.LB_RefChap.Visible = False
Comment.CB_ValiderSansRet.Visible = True
Comment.CB_Valider.Visible = False
Comment.Show
End Sub |
Partager