Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1514 connectés 

  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  erreur de compilation projet ou bibliothèque introuvable

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

erreur de compilation projet ou bibliothèque introuvable

n°2211395
treizehube​rt
...froma la planète Marseille
Posté le 22-11-2013 à 16:47:03  profilanswer
 

Excel 2003 & 2007
VBA
 
Bonjour à tous,
 
J'ai, grâce à des bouts de code que j'ai glanés sur le net, produit un fichier afin d'alimenter un fichier adhérents de mon asso.
Sur ma machine avec Excel 2003, tout fonctionne parfaitement.
Hier, j'ai fourni une copie de mon fichier à un ami qui "tourne" sous Excel 2007 et dès la création d'une fiche il bute sur un problème dont j'ai pu voir qu'il était très répandu.
Pourtant, j'ai beau chercher, je ne trouve pas la solution car, même si le message d'erreur est connu, la solution semble différente selon le fichier, la machine, la macro...
Je vous colle ici la totalité de ma macro en espérant que vous pourrez m'aider.
A noter que la macro stoppe sur la commande derlign = .Range("a65536" ).End(xlUp).Row + 1 avec le message d'erreur Erreur de compilation projet ou bibliothèque introuvable
 
J'ajoute que je suis vraiment débutant...  
 
Merci d'avance,
Hubert
 
-*-*-*-*-*-*-*-*
 
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 = TextBoxPOLE
    .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 = TextBoxOPUS
    .Cells(derlign, 20).Value = ListBoxInvestiture
    .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

mood
Publicité
Posté le 22-11-2013 à 16:47:03  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  erreur de compilation projet ou bibliothèque introuvable

 

Sujets relatifs
projet excel non finalisé car limites de competences HELP HELPmessage d'erreur fscanf et STDIN !!!
erreur compilationErreur phpMyadmin "The mbstring extension is missing"
[Erreur] Exception in Thread ....erreur non comprise
[Noob] Quel outil ou méthode de programmation pour ce projet ???compilation de Gcc3.2 a Gcc3.4
xls erreur sur code "If Target =" lors d'insertion de ligne 
Plus de sujets relatifs à : erreur de compilation projet ou bibliothèque introuvable


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR