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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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