Bonjour à toutes et à tous,

J'ai un problème avec mon code VBA. Erreur d’exécution '1004', Erreur définie par l'application ou par l'objet
Cette erreur apparaît à la ligne : wbCatalogue.Sheets(iFeuille).Range(nameC(x) + "1").Select
Dans ma boucle For



Voici mon code :


Private Sub btnGenereSupports_Click()

Dim wbCatalogue As Workbook

Dim wsListe As Worksheet

Dim iCat As Integer
Dim iFeuille As Integer
Dim iInfo As Integer
Dim colonne As String
Dim chemin As String
Dim prefixe As String
Dim version As String
Dim cheminComplet As String
Dim iObjet As Integer
Dim iAttribut As Integer
Dim iCtrle As Integer
Dim iCle As Integer
Dim typeValeur As Integer
Dim valInt As Integer
Dim valStr As String
Dim nbCol As Integer

Dim NoCol As Integer, Cell As Range
Dim NoLig As Long, Derlig As Long, Var As Variant
Dim paramC As Variant
Dim nameC As Variant
Dim nbrC As Integer
Dim x As Integer



Set wsListe = Application.ThisWorkbook.Sheets("Liste")

' récup les valeurs sur la 1ere feuille
chemin = wsListe.Cells(1, 8)
prefixe = wsListe.Cells(2, 8)


iCat = 2
Do While Not IsEmpty(wsListe.Cells(iCat, 1))
' si avancement est renseigné on ne le refait pas
If IsEmpty(wsListe.Cells(iCat, 3)) Then
nomCatalogue = wsListe.Cells(iCat, 1)
version = wsListe.Cells(iCat, 2)
' ouvrir le fichier catalogue
cheminComplet = chemin & "\" & prefixe & nomCatalogue & "_v" & version & ".xlsx"
Set wbCatalogue = Workbooks.Open(cheminComplet)
iFeuille = 1
Do While iFeuille <= wbCatalogue.Sheets.Count
' nom de la feuille
nomSupport = wbCatalogue.Sheets(iFeuille).Name
' ne pas traiter la feuille de suivi
If nomSupport <> "-Suivi-" And Left(nomSupport, 1) <> "#" Then
' supports de saisie
If wbCatalogue.Sheets(iFeuille).Cells(1, 1) = "Info" Then
' ====================================================================================================
' Ajouter les traitements ici
' ==================================================================================================


'Espace --> underscore | suppression "d'" et "l'"
NoLig = wbCatalogue.Sheets(iFeuille).Range("A1", wbCatalogue.Sheets(iFeuille).Range("A1").End(xlDown)).Rows.Count

For x = 2 To NoLig
Var = wbCatalogue.Sheets(iFeuille).Cells(x, 1)
Var = Replace(Var, " ", "_")
Var = Replace(Replace(Var, "d'", ""), "l'", "")
wbCatalogue.Sheets(iFeuille).Cells(x, 1).Value = Var
Next

'Dé-fusion des cellules à droite du tableau
wbCatalogue.Sheets(iFeuille).Range("H1").MergeCells = False

' 'Insertion des colonnes G à T
paramC = Array("format", "clé", "ctrl1", "p11", "p12", "p13", "ctrl21", "p21", "p22", "p23", "ctrl3", "p31", "p32", "p33")
nameC = Array("G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T")

nbrC = 7
For x = 0 To 13
wbCatalogue.Sheets(iFeuille).Range(nameC(x) + "1").Select
Selection.EntireColumn.Insert
wbCatalogue.Sheets(iFeuille).Cells(1, nbrC) = paramC(x)
nbrC = nbrC + 1
Next x


'If Obligatoire = O => Ctrl1 = 1

NoLig = wbCatalogue.Sheets(iFeuille).Range("A1", wbCatalogue.Sheets(iFeuille).Range("A1").End(xlDown)).Rows.Count

For x = 2 To NoLig
Var = wbCatalogue.Sheets(iFeuille).Cells(x, 3)
If Var = "O" Then
wbCatalogue.Sheets(iFeuille).Cells(x, 9) = 1
End If
Next x

End If
End If
iFeuille = iFeuille + 1
Loop
' fermer le catalogue en enregistrant
wbCatalogue.Close SaveChanges:=True
wsListe.Cells(iCat, 3) = "fait"
End If
iCat = iCat + 1
Loop
End Sub

Je vous remercie d'avance pour votre aide et vos propositions