relative path  How is

ADRIANA P
ADRIANA P used Ask the Experts™
on
need to open some  data books  

but want to use the relative path

not the full path

but is not opening why ??
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2014

Commented:
We need more details
ADRIANA PACCOUNTING ASSISTANT

Author

Commented:
I have some files an folder

1- folder A ( folder A is in C drive)

then

2- inside folder A  

have many files B, C ,D



 want the relativa path no the full path
Top Expert 2014
Commented:
The key word is "relative".  What is your current/starting folder?

If I'm in folder B, then the relative path to C would be: ..\C
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

ADRIANA PACCOUNTING ASSISTANT

Author

Commented:
aikimark Thanks for the fast reponse

need create an button to open   file inside folder B

folder b is inside folder A


aaaaaaaa.PNG

folder A is inside drive C


need buton to open file HHH  with the relative path
Top Expert 2014

Commented:
No. I'm no closer to understanding your relative path problem than I was when I first read the question.

The path to HHH is: C:\A\B\HHH
No relative pathing is necessary.
ADRIANA PACCOUNTING ASSISTANT

Author

Commented:
aikimark

Thnkas  

i need it because i can change the folder A location  in any time
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
Do you mean this? It allows you to select any workbook that's in your current path. If you want to you can change this line

fDialog.InitialFileName = ThisWorkbook.Path

Open in new window


to something like

fDialog.InitialFileName = "C:\folderA\folderB"

Open in new window


where folderA is the main folder and folderB is a subfolder inside that folder.
29076816.xlsm
ADRIANA PACCOUNTING ASSISTANT

Author

Commented:
Martin  

my question is to not use the C drive letter

because if i change the location  i will have to make a lot of changes to the buttons
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
OK then it currently will open the folder where your main workbook is. Isn't that what you want?
ADRIANA PACCOUNTING ASSISTANT

Author

Commented:
Martin that a great one

it will help !!
ADRIANA PACCOUNTING ASSISTANT

Author

Commented:
Best Experts !

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial