A
aure_8
Guest
Bonjour à tous,
Sur une macro j'ai un problème qui m'indique une incompatibilité de type sur une de mes lignes
Sur une macro j'ai un problème qui m'indique une incompatibilité de type sur une de mes lignes
Code:
\Option Explicit
Sub Recopie(Kase As Range)
Dim Chemin As String, Fichier As String
Chemin = ThisWorkbook.Path & Application.PathSeparator
Fichier = Range("A2.A350" & (((Kase.Row - 4) \ 7) * 7) + 1) => ligne à problème
If Dir(Chemin & Fichier) = "" Then
MsgBox "Le fichier " & Fichier & ".xls est introuvable"
Exit Sub
End If
Application.ScreenUpdating = False
With Workbooks.Open(Chemin + Fichier)
With .Sheets(1)
With .Range("H" & 84 + ((Kase.Row - 4) Mod 6))
.Value = Kase
.NumberFormat = "m/d/yyy"
End With
End With
.Close savechanges:=True
End With
End Sub\[code]
Je mets en PJ les fichiers correspondant à ma macro.
Merci à vous et bonne journée,
Cdlt
Pièces jointes
Dernière modification par un modérateur: