Erreur 91 VBA Excel

kaisusr Messages postés 1 Statut Membre -  
thev Messages postés 2070 Statut Membre -
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 2070 Statut Membre 717
 
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