Aide sur erreur 91
Zerife
-
f894009 Messages postés 17414 Date d'inscription Statut Membre Dernière intervention -
f894009 Messages postés 17414 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
J'ai un blocage sur une macro, et je ne comprends pas pourquoi ça bloque. J'ai besoin d'aide.
La macro bloque sur la ligne :
DerLignesh = rngTrouve.Row
erreur d’exécution 91 "variable de bloc With non définie"
Sub Concatene_EVImport()
Dim sarray
Dim sh As Worksheet, shimp As Worksheet
Dim DerLigne As Long, DerLignesh As Long, rngTrouve As Range
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Sheets.Add.Name = "ImportDV"
Set shimp = Sheets("ImportDV")
sarray = Array("ImportDV", "Base", "REF", "Modele Horaire", "Modele Forfait jour", "Liste des onglets")
For Each sh In ActiveWorkbook.Worksheets
If IsError(Application.Match(sh.Name, sarray, 0)) Then
With sh
DerLigne = shimp.Cells(.Rows.Count, "A").End(xlUp).Row + 1
Set rngTrouve = .Columns("AZ:AZ").Find("*", After:=.Range("AZ1"), searchdirection:=xlPrevious, LookIn:=xlValues)
DerLignesh = rngTrouve.Row
.Range("AZ9:BC" & DerLignesh).Copy
shimp.Cells(DerLigne, 1).PasteSpecial (xlPasteValues)
shimp.Cells(DerLigne, 1).PasteSpecial (xlPasteFormats)
Application.CutCopyMode = False
End With
End If
Next sh
With shimp.Range("A1:D1")
.HorizontalAlignment = xlCenter
.MergeCells = False
.Merge
.Value = "synthese salarié horaire"
End With
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Merci pour votre aide,
Cdl
Zérife
J'ai un blocage sur une macro, et je ne comprends pas pourquoi ça bloque. J'ai besoin d'aide.
La macro bloque sur la ligne :
DerLignesh = rngTrouve.Row
erreur d’exécution 91 "variable de bloc With non définie"
Sub Concatene_EVImport()
Dim sarray
Dim sh As Worksheet, shimp As Worksheet
Dim DerLigne As Long, DerLignesh As Long, rngTrouve As Range
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Sheets.Add.Name = "ImportDV"
Set shimp = Sheets("ImportDV")
sarray = Array("ImportDV", "Base", "REF", "Modele Horaire", "Modele Forfait jour", "Liste des onglets")
For Each sh In ActiveWorkbook.Worksheets
If IsError(Application.Match(sh.Name, sarray, 0)) Then
With sh
DerLigne = shimp.Cells(.Rows.Count, "A").End(xlUp).Row + 1
Set rngTrouve = .Columns("AZ:AZ").Find("*", After:=.Range("AZ1"), searchdirection:=xlPrevious, LookIn:=xlValues)
DerLignesh = rngTrouve.Row
.Range("AZ9:BC" & DerLignesh).Copy
shimp.Cells(DerLigne, 1).PasteSpecial (xlPasteValues)
shimp.Cells(DerLigne, 1).PasteSpecial (xlPasteFormats)
Application.CutCopyMode = False
End With
End If
Next sh
With shimp.Range("A1:D1")
.HorizontalAlignment = xlCenter
.MergeCells = False
.Merge
.Value = "synthese salarié horaire"
End With
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Merci pour votre aide,
Cdl
Zérife
A voir également:
- Aide sur erreur 91
- Erreur t32 ✓ - Forum Livebox
- Erreur 0x80070643 - Accueil - Windows
- Erreur 4101 france tv - Forum Lecteurs et supports vidéo
- Erreur 4201 france tv ✓ - Forum Réseaux sociaux
- Code erreur f3500-31 ✓ - Forum Bbox Bouygues