Jugger_man
New Member
- Joined
- Jul 26, 2012
- Messages
- 2
New user to the forum and afraid I'm asking an obvious question. Everything I know about Excel and macros I've learned by recording them and tearing apart the code to translate it. I have 0 experience with VBA, so be gentle.
What I'm trying to do is (inside a macro)pull data from different folders based on the current user-
\\Mainframe\Server\System\UserData\b0grizw\samefilename.xls
\\Mainframe\Server\System\UserData\t4kavoy\samefilename.xls
\\Mainframe\Server\System\UserData\c0lee\samefilename.xls
\\Mainframe\Server\System\UserData\cmcgee9\samefilename.xls
As it stands now, I write a macro in a worksheet, then go back and edit it 4 times, one for each user. Everyone has to use a different worksheet to pull their info, even tho we use the same data in the same way.
I thought that was the only way to do it, until I just came across another program that someone had written before, however that someone no longer works for my company. For some reason I think that his was based on using the "Recent Documents" folder in (XP)
C:\Documents and Settings\Users\c0lee\samefilename.xls, however, again it is obviously hidden inside another user profile.
I'm hoping that this is something that can be easily overcome by an Excel Master. I am your humble grasshopper.
P.S. If anyone can give me a quick and dirty way to close a dialog box (Do you want to save changes before closing? [No]), that would be great.
What I'm trying to do is (inside a macro)pull data from different folders based on the current user-
\\Mainframe\Server\System\UserData\b0grizw\samefilename.xls
\\Mainframe\Server\System\UserData\t4kavoy\samefilename.xls
\\Mainframe\Server\System\UserData\c0lee\samefilename.xls
\\Mainframe\Server\System\UserData\cmcgee9\samefilename.xls
As it stands now, I write a macro in a worksheet, then go back and edit it 4 times, one for each user. Everyone has to use a different worksheet to pull their info, even tho we use the same data in the same way.
I thought that was the only way to do it, until I just came across another program that someone had written before, however that someone no longer works for my company. For some reason I think that his was based on using the "Recent Documents" folder in (XP)
C:\Documents and Settings\Users\c0lee\samefilename.xls, however, again it is obviously hidden inside another user profile.
I'm hoping that this is something that can be easily overcome by an Excel Master. I am your humble grasshopper.
P.S. If anyone can give me a quick and dirty way to close a dialog box (Do you want to save changes before closing? [No]), that would be great.