Re : "Projet ou bibliothèque introuvable"
...
Je copie ici le code complet du bouton "Enregistrer", car il est effectivement illisible dans la capture :
Private Sub CommandButtonEnregistrer_Click()
Worksheets("TABLE").Visible = xlSheetVisible
Worksheets("TABLE").Select
With Worksheets(2)
.Unprotect
Range("A65536").End(xlUp).Offset(1, 0).Select
Selection.Rows.EntireRow.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
derlign = .Range("a65536").End(xlUp).Row + 1
.Cells(derlign, 1).Value = TextBoxNum_Adh
.Cells(derlign, 2).Value = TextBoxNom
.Cells(derlign, 3).Value = TextBoxPrenom
.Cells(derlign, 4).Value = TextBoxNaissance
.Cells(derlign, 5).Value = TextBoxAdresse
.Cells(derlign, 6).Value = TextBoxVille
.Cells(derlign, 7).Value = TextBoxCP
.Cells(derlign, 8).Value = TextBoxTPH
.Cells(derlign, 9).Value = TextBoxEmail
.Cells(derlign, 10).Value = TextBoxMatricule
.Cells(derlign, 11).Value = TextBoxPOLICE
.Cells(derlign, 12).Value = TextBoxTITU
.Cells(derlign, 13).Value = ListBoxGrade
.Cells(derlign, 14).Value = TextBoxDate_Grade
.Cells(derlign, 15).Value = TextBoxDate_Examen
.Cells(derlign, 16).Value = ListBoxDirection
.Cells(derlign, 17).Value = TextBoxVille2
.Cells(derlign, 18).Value = TextBoxService
.Cells(derlign, 19).Value = TextBoxOPJ
.Cells(derlign, 20).Value = ListBoxInvestigation
.Cells(derlign, 21).Value = ListBoxQualité
.Cells(derlign, 22).Value = TextBoxDate_Adhesion
.Cells(derlign, 23).Value = ListBoxCotisation
.Cells(derlign, 24).Value = TextBoxCONJOINT
.Cells(derlign, 25).Value = ListBoxMode_Paiement
.Cells(derlign, 26).Value = TextBoxMontant
.Cells(derlign, 27).Value = ListBoxN
.Cells(derlign, 28).Value = ListBoxN1
.Cells(derlign, 29).Value = ListBoxN2
.Cells(derlign, 30).Value = TextBoxOBS
.Cells(derlign, 31) = (TextBoxNom + " " + TextBoxPrenom)
Range("A1").CurrentRegion.Select
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With
Sheets("TDB").Select
'Efface le contenu des Box de saisie
Dim objControl As Control
For Each objControl In ADRESSE.Controls
If TypeOf objControl Is MSForms.TextBox Then
objControl.Text = ""
ElseIf TypeOf objControl Is MSForms.ComboBox Then
objControl.ListIndex = -1
ElseIf TypeOf objControl Is MSForms.ListBox Then
objControl.ListIndex = -1
End If
Next objControl
Range("A65536").End(xlUp).Offset(1, 0).Select
Worksheets(2).Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Worksheets(2).EnableSelection = xlUnlockedCells
Worksheets("TABLE").Visible = xlSheetVeryHidden
End Sub