Erreur 91 VBA Excel

kaisusr Messages postés 1 Statut Membre -  
thev Messages postés 2007 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,
je suis entrain de développer un macro pour excel 2013 et je le met sous PERSONAL.XLSB, mais j'ai toujours cette erreur lorsque je veux récupérer le chemin de fichier courant. l'erreur est la suivante: Erreur d'exécution '91' :
Variable objet ou variable bloc With non définie.
mon code est le suivant:
Sub ouverture()

If (ActiveWorkbook.Path = "C:\GED\TEMP") Then
If ExisteFichier("C:\GED\winscp.exe") Then
MsgBox ActiveWorkbook.Path

End If

End If

End Sub


1 réponse

  1. thev Messages postés 2007 Date d'inscription   Statut Membre Dernière intervention   722
     
    Sub ouverture()

    If (ActiveWorkbook.Path = "C:\GED\TEMP") Then
    If Dir ("C:\GED\winscp.exe") <> "" Then
    MsgBox ActiveWorkbook.Path

    End If

    End If

    End Sub

    --
    0