relative path How is

need to open some  data books  

but want to use the relative path

not the full path

but is not opening why ??
ADRIANA PACCOUNTING ASSISTANTAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aikimarkCommented:
We need more details
0
ADRIANA PACCOUNTING ASSISTANTAuthor 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
0
aikimarkCommented:
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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

ADRIANA PACCOUNTING ASSISTANTAuthor 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
0
aikimarkCommented:
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.
1
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
aikimark

Thnkas  

i need it because i can change the folder A location  in any time
0
Martin LissOlder than dirtCommented:
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
1
ADRIANA PACCOUNTING ASSISTANTAuthor 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
0
Martin LissOlder than dirtCommented:
OK then it currently will open the folder where your main workbook is. Isn't that what you want?
1
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Martin that a great one

it will help !!
0
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Best Experts !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.