Magic_Sponge
New Member
- Joined
- Oct 28, 2021
- Messages
- 11
- Office Version
- 365
- Platform
- Windows
Hello everyone. I'm really hoping someone can help as this one has really stumped me and I've searched all afternoon for the answer but can't find anything.
My issue is I've just moved to a new company which uses Dropbox (first time for me) and so I'm struggling to work out how to do things. Essentially I have a folder which is shared with multiple users. In this folder, there are three sub-folders which represents the 'lifecycle' of a piece of work the users need to complete. So it moves from 'To be reviewed' to 'To be Approved' to 'Approved'. I have code in the document which, when the button is clicked, saves it in the next folder and then kills the file in the original folder.
After some quick searching I found I could use Environ("Homepath") to get the correct address for the users. But the weird thing is, when one of the users tries to click the first button, it comes up with error 1004 saying it can't find the next folder, even though it works fine for me. The really weird thing is the path it shows looks right to me except it adds a whole load of random characters at the end of the path string.
The line of code that trips up is
Like I say, it works fine on my PC. I asked one of the team to test it, and got the following error message:
Run-time error '1004':
Microsoft Excel cannot access the file 'C:\Users\User Name\Dropbox Name\Shared Folder\To Be Approved\324CA200'. There are several possible reasons:
My issue is I've just moved to a new company which uses Dropbox (first time for me) and so I'm struggling to work out how to do things. Essentially I have a folder which is shared with multiple users. In this folder, there are three sub-folders which represents the 'lifecycle' of a piece of work the users need to complete. So it moves from 'To be reviewed' to 'To be Approved' to 'Approved'. I have code in the document which, when the button is clicked, saves it in the next folder and then kills the file in the original folder.
After some quick searching I found I could use Environ("Homepath") to get the correct address for the users. But the weird thing is, when one of the users tries to click the first button, it comes up with error 1004 saying it can't find the next folder, even though it works fine for me. The really weird thing is the path it shows looks right to me except it adds a whole load of random characters at the end of the path string.
The line of code that trips up is
VBA Code:
ActiveWorkbook.SaveAs Environ("HOMEPATH") & "\Dropbox Name\Shared Folder\To Be Approved\File.xlsm"
Like I say, it works fine on my PC. I asked one of the team to test it, and got the following error message:
Run-time error '1004':
Microsoft Excel cannot access the file 'C:\Users\User Name\Dropbox Name\Shared Folder\To Be Approved\324CA200'. There are several possible reasons:
- The file name or path does not exist
- The file is being used by another program
- The workbook you are trying to save has the same name as...