Bonjour voici le codes vba "dont mon chemin pour ouvrir le classeur est ( ce pc , System (c:) , utilisateur , moi , bureau )
sub visé
Dim trigramme as String , Dim as Long , derlig as Long
with sheets("confirm client")
dl = . Range("b" & Rows.count).End(xLUP).Row
for i = 3 to dl
If range ("g" & I).value ="reçus" then
sélect case ( range"h" & i).value
case "prendre", "décompte"
.Range("i" & i) = "correct"
.Range=("i" & i ) ="incorrect"
end select
else
.Range=("i" & i ) ="incorrect"
End if
Next I
Range("O4") = Date
trigramme = Inputbox ( "Trigramme ","Votre trigramme")
Range ("N4").value = trigramme
Range("P4") = Time
End with
Dim w As Workbook, f As Worksheet, fa As Worksheet, cell As Range
Dim dte As Date, ln&, j&, chemin$
Set fa = ActiveSheet
dte = fa.Range("M4")
On Error Resume Next
Set w = Workbooks("fi.xlsx")
If Err.Number <> 0 Then
chemin = ThisWorkbook.Path & "C:\Utilisateur\Moi\Bureau\Vérif.xlsx
Workbooks.Open Filename:=chemin & "Vérif.xlsx"
If ThisWorkbook.Name = ActiveWorkbook.Name Then
MsgBox "Le fichier ''fi.xlsx'' n'a pas été trouvé dans le " & _
"dossier du présent fichier.", 16
Exit Sub
Else
Set w = ActiveWorkbook
End If
End If
Set f = w.Sheets("Feuil1")
Set cell = f.Range("B:B").Find(dte, lookat:=xlWhole)
ln = cell.Row
If Not cell Is Nothing Then
For j = 3 To 8
f.Cells(ln, j) = fa.Cells(4, j + 9)
Next j
End If
w.Close True
End sub
Cordialement , merci pour votre aide