Bonjour,

Merci d'avance de votre aide.
Mon code ne fonctionne pas quand je le lance.
j'ai une erreur 9 au niveau du choix du Sheets.
ça me renvoie toujours au premier fichier et non là ou je l'execute.
Merci

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Sub Test13()
Dim Wkb As Workbook
Dim Rng As Range
Dim myPath As String, myFile As String
 
Dim valeur As String, i As Integer, j As Integer
Dim Wksh As Worksheet
Dim Cell As Range

myPath = "C:\Users\***\Desktop\test"
myFile = Dir(myPath & "\*.*")
 
'Do While myFile <> ""
'For Each Cell In Ws.Range("A")
Set Wkb = Workbooks.Open("C:\Users\***\Desktop\test\site.xlsx")
    Range(Range("A" & ActiveCell.Row), Range("IV" & ActiveCell.Row).End(xlToLeft)).Copy
    'Range("A:A").Select
    'Selection.Copy

Set Wb = Workbooks("nomfichier.xlsm")
    Sheets("Info_Site").Select
    'Sheets("Info_Site").Select
    'Sheets("Info_Site").Range("B3").Paste
    Range("B3").Paste
    ActiveSheet.Paste
    Application.CutCopyMode = False
Call Module1.Bouton2_Cliquer

'Next Cell
'Loop

End Sub