-1
I work on two PC's one at home and one at work. The user name for my home pc is Mike. for work it is mmcloughlin. I have a text file that is located at C:\Users\Mike\Dropbox on my home computer. On my work computer the same file is located at c:\users\mmcloughlin\dropbox . When I run a Macro script to access that file, it throws an error when i am on my work computer. It is expecting mike instead of mmcloughlin. How do i "fool" the script into finding the file both at the mike location and at the mmcloughlin location?
Is this a VBA macro used for example in Excel or Word? – angelofdev – 2018-09-17T00:55:07.907
Why is the capitalization inconsistent for folders and filenames (i.e.
Dropbox
versusdropbox
)? If you used consistent capitalization, then a user environment variable for the path to the HOME folder would be a quick and simple solution. – sawdust – 2018-09-17T01:29:28.347