Erreur 91 VBA Excel

Fermé
kaisusr Messages postés 1 Date d'inscription jeudi 9 octobre 2014 Statut Membre Dernière intervention 9 octobre 2014 - 9 oct. 2014 à 12:16
thev Messages postés 1874 Date d'inscription lundi 7 avril 2008 Statut Membre Dernière intervention 1 octobre 2024 - 11 oct. 2014 à 16:54
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 1874 Date d'inscription lundi 7 avril 2008 Statut Membre Dernière intervention 1 octobre 2024 688
11 oct. 2014 à 16:54
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