Retrieve the directory path of an Excel file on the network
Solved
kev76150
Posted messages
16
Status
Membre
-
kev76150 Posted messages 16 Status Membre -
kev76150 Posted messages 16 Status Membre -
Hello,
I have a problem I can't solve.
I am creating an Excel file for my business.
I want to retrieve the directory path where my Excel file is located.
For that, I use:
This works very well if, for example, my Excel file is on my computer, but the problem is that in my company we store files on the network. And when I put my Excel file on the network, this command line no longer works.
Do you have a solution, please?
I have a problem I can't solve.
I am creating an Excel file for my business.
I want to retrieve the directory path where my Excel file is located.
For that, I use:
Dim chemin As String
ChDir (ThisWorkbook.Path)
ChDir "."
chemin = CurDir(ThisWorkbook.Path)
This works very well if, for example, my Excel file is on my computer, but the problem is that in my company we store files on the network. And when I put my Excel file on the network, this command line no longer works.
Do you have a solution, please?
1 réponse
yg_be
Posted messages
23437
Registration date
Status
Contributeur
Last intervention
Ambassadeur
1 588
and so?
Dim path As String path = ThisWorkbook.Path
kev76150
Posted messages
16
Status
Membre
It works THANK YOU VERY MUCH :)