Retrieve the directory path of an Excel file on the network
Solved
kev76150
Posted messages
16
Status
Member
-
kev76150 Posted messages 16 Status Member -
kev76150 Posted messages 16 Status Member -
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?