Qualificateur incorrect

Résolu
Tom 44 Messages postés 47 Date d'inscription   Statut Membre Dernière intervention   -  
f894009 Messages postés 17277 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,


Je suis en train de plancher (grâce à l'aide de quelque uns d'entre vous) sur une macro assez fastidieurse et à mon grand regret je tombe sur une erreur que je ne connaissais pas "qualificateur incorrect" à cette ligne de code :

Do While Not (IsEmpty(shSUIVI).Cells(j, 2))

Y voyez vous une erreur de synthaxe ou autre ?


Vous trouverez le lien de la macro ci-dessous :

https://www.cjoint.com/?CJjpuFuM4H3


Merci d'avance pour votre aide.

29 réponses

f894009 Messages postés 17277 Date d'inscription   Statut Membre Dernière intervention   1 713
 
Re,

Je vais vous proposer une autre methode.

A+
0
Tom 44 Messages postés 47 Date d'inscription   Statut Membre Dernière intervention  
 
Re,

Merci par avance pour le temps que consacrez à mon cas.

A+
0
f894009 Messages postés 17277 Date d'inscription   Statut Membre Dernière intervention   1 713
 
Re,

Si vous n'avez pas modifie la partie copie infos, vous copiez toutes les infos dans la meme cellule cells(j,2) pour une ligne. Vous avez aussi des erreurs de noms ex: deux fois etat_pm ????

Est-ce normale que des dossiers n'existent pas dans suivi d2 ???

A+
0
Tom 44 Messages postés 47 Date d'inscription   Statut Membre Dernière intervention  
 
Re,

En effet petite erreur de copier-coller malencontreuse, ci-après le code corrigé :

j = 10
Do While Not IsEmpty(shSUIVI.Cells(j, 2))

If shSUIVI.Cells(j, 2) = Dossier Then

If Not IsNull(Id_PM) Or Id_PM <> "" Then
shSUIVI.Cells(j, 3) = Id_PM
End If
If Not IsNull(Etat_PM) Or Etat_PM <> "" Then
shSUIVI.Cells(j, 4) = Etat_PM
End If
If Not IsNull(Id_PA) Or Id_PA <> "" Then
shSUIVI.Cells(j, 5) = Id_PA
End If
If Not IsNull(Etat_PM) Or Etat_PA <> "" Then
shSUIVI.Cells(j, 6) = Etat_PA
End If
If Not IsNull(Id_Process) Or Id_Process <> "" Then
shSUIVI.Cells(j, 7) = Id_Process
End If
If Not IsNull(Num) Or Num <> "" Then
shSUIVI.Cells(j, 9) = Num
End If
If Not IsNull(Num_cplt) Or Num_cplt <> "" Then
shSUIVI.Cells(j, 10) = Num_cplt
End If
If Not IsNull(Voie) Or Voie <> "" Then
shSUIVI.Cells(j, 11) = Voie
End If
If Not IsNull(Adresse) Or Adresse <> "" Then
shSUIVI.Cells(j, 12) = Adresse
End If
If Not IsNull(Batiment) Or Batiment <> "" Then
shSUIVI.Cells(j, 13) = Batiment
End If
If Not IsNull(Etat_Nego) Or Etat_Nego <> "" Then
shSUIVI.Cells(j, 14) = Etat_Nego
End If
If Not IsNull(Nb_logt) Or Nb_logt <> "" Then
shSUIVI.Cells(j, 15) = Nb_logt
End If
If Not IsNull(logt_R) Or logt_R <> "" Then
shSUIVI.Cells(j, 16) = logt_R
End If
If Not IsNull(logt_P) Or logt_P <> "" Then
shSUIVI.Cells(j, 17) = logt_P
End If
If Not IsNull(Annee_prog) Or Annee_prog <> "" Then
shSUIVI.Cells(j, 18) = Annee_prog
End If
If Not IsNull(typo) Or typo <> "" Then
shSUIVI.Cells(j, 19) = typo
End If
If Not IsNull(Envoi_acces) Or Envoi_acces <> "" Then
shSUIVI.Cells(j, 20) = Envoi_acces
End If
If Not IsNull(Valid_acces) Or Valid_acces <> "" Then
shSUIVI.Cells(j, 21) = Valid_acces
End If
If Not IsNull(Id_PB) Or Id_PB <> "" Then
shSUIVI.Cells(j, 24) = Id_PB
End If
If Not IsNull(Date_PB) Or Date_PB <> "" Then
shSUIVI.Cells(j, 25) = Date_PB
End If
If Not IsNull(Code_syndic) Or Code_syndic <> "" Then
shSUIVI.Cells(j, 26) = Code_syndic
End If
If Not IsNull(Nom_syndic) Or Nom_syndic <> "" Then
shSUIVI.Cells(j, 27) = Nom_syndic
End If
If Not IsNull(DTA) Or DTA <> "" Then
shSUIVI.Cells(j, 28) = DTA
End If
If Not IsNull(Nego_int) Or Nego_int <> "" Then
shSUIVI.Cells(j, 29) = Nego_int
End If
If Not IsNull(Envoi_accord) Or Envoi_accord <> "" Then
shSUIVI.Cells(j, 31) = Envoi_accord
End If
If Not IsNull(Retour_accord) Or Retour_accord <> "" Then
shSUIVI.Cells(j, 32) = Retour_accord
End If
If Not IsNull(Refus_accord) Or Refus_accord <> "" Then
shSUIVI.Cells(j, 33) = Refus_accord
End If
If Not IsNull(Date_recep_PETU) Or Date_recep_PETU <> "" Then
shSUIVI.Cells(j, 34) = Date_recep_PETU
End If
If Not IsNull(Date_valid_PETU) Or Date_valid_PETU <> "" Then
shSUIVI.Cells(j, 35) = Date_valid_PETU
End If
If Not IsNull(Date_accord) Or Date_accord <> "" Then
shSUIVI.Cells(j, 36) = Date_accord
End If

GoTo debut
trouve = True
End If
j = j + 1
Loop



Par contre, pour ce qui est de la partie des codes dans l'onglet suivi D2, ils devraient tous apparaitre dans la colonne B du fichier cible.

Ce n'est pas le cas dans votre version du fichier ?

A+
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
f894009 Messages postés 17277 Date d'inscription   Statut Membre Dernière intervention   1 713
 
Re,

Votre fichier modifie: pensez a changer le chemin des fichiers dans:

Function RechercheFichier() As String



https://www.cjoint.com/c/CJoqYWuPzIw

A+
0
Tom 44 Messages postés 47 Date d'inscription   Statut Membre Dernière intervention  
 
Whoa,

Quelle optimisation !!!
Merci pour votre travail.

Par contre je pense que je dois mal m'y prendre, mais où dois-je indiquer le chemin des fichiers ?
J'ai bien votre commentaire mais le "NomFichier" reste apparament vide à l'execution de la macro.
Si mon fichier se situe sur mmon bureau cela donnera bien C:\Bureau ???
J'avoue que je commence à y perdre mon latin...

Dsl encore pour mon innexperience sur la question.
0
f894009 Messages postés 17277 Date d'inscription   Statut Membre Dernière intervention   1 713
 
Re,

dans Function RechercheFichier() As String:

remplacez:

"D:\_Docs_Prog_Excel\_Excel_a_traiter\Tom44"

par:

"C:\Users\nom de l'utilisateur\Desktop\"

nom de l'utilisateur: votre nom de connexion

pour avoir directement l'endroit ou sont vos fichiers

A+
0
Tom 44 Messages postés 47 Date d'inscription   Statut Membre Dernière intervention  
 
Cela fonctionne parfaitement.

Encore merci pour votre patience et votre professionnallisme.

Bien cordialement.
0
f894009 Messages postés 17277 Date d'inscription   Statut Membre Dernière intervention   1 713
 
Bonjour,

dans Sub MAJ_OPTIMUM()

une ligne de code a ajouter apres les declarations de variables:

Application.ScreenUpdating = False

et une ligne de code a ajouter avant MsgBox "MAJ Terminée", vbOKOnly

Application.ScreenUpdating = True
0