Can excel Vba search dropbox for a folder or document?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,210
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
I have a problem with dropbox
we have a number of users that have access to my dropbox account but i'm getting problems with them opening other documents in dropbox using VBA with my filepath.

the code "
Environ$("UserProfile")"
and the first part "
Fold1 = "Dropbox (ALL)" " work great.
but for some reason Dropbox can give different file paths to the same Document.
for example
Mine is
Environ$("UserProfile")\
Dropbox (ALL)\
Admin\
Caps\Master File.xlsm

but this does not work for others.

so I was wondering, is there a way to say "Find this Document" I whatever folder its in or where it is in my dropbox?
there will only ever be one Document with at name?

Please help with any suggestions as at the moment everytime we add a new user I have to add a new filepath.

below is the code i'm using fir me but I'm happy to try any ideas?

thanks

Tony



Code:
Sub Example_open1()

Fold1 = "Dropbox (ALL)"
Fold2 = "Admin"
Fold3 = "Caps"
WBName = "Master File"

Folds = Fold1 & "\" & Fold2 & "\" & Fold3 & WBName
fd = Environ$("UserProfile") & "\" & Folds & ".xlsm"
Workbooks.Open (fd)
End Sub
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Even if we assume the file is located on a share drive, if there is anything in the path that you use to accesst the file that is unique to your computer and not available to other users, then the other users would not be able to use the same path to access the file. But if the complete file path of drive, directory, and subdirectories are all on only the share drive server,and all users have the same drive designation for the share drive, then they should be able to access the file using the same path.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,879
Messages
6,175,150
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top