Erreur 91 VBA Excel

kaisusr Messages postés 1 Date d'inscription   Statut Membre Dernière intervention   -  
thev Messages postés 1985 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




A voir également:

1 réponse

thev Messages postés 1985 Date d'inscription   Statut Membre Dernière intervention   713
 
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