glassishalfempty
New Member
- Joined
- Jun 5, 2002
- Messages
- 11
I would think that this would be easy to do, but I cannot figure it out. I have searched the boards as well, but I couldn't find the answer.
Basically what I am doing is a macro that copies info out of one workbook into a new workbook and doing some manipulation of that data. The problems comes when I want the user to save the new workbook. I want the user to (1) enter the name that the new workbook is to be save by; and (2) allow the user to choose the folder that they want to save it in (everyone's elses question was to limit the user to a specific folder).
The code below is what I am using. Entering the file name is OK (step #1 above), but as you can see it always saves the new workbook in the "M:\Offices\" folder (step #2). Actually, for Step #2, I just want to "lead" the user to this main folder ("Offices") and then make the user to choose one of the Offices' subfolders (the actual office names) that the file belongs in before saving? Thank you.
FileName1 = InputBox("Please input filename", "Filename")
ChDir "M:\Offices\"
ActiveWorkbook.SaveAs Filename:="M:\Offices\" & FileName1, FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Basically what I am doing is a macro that copies info out of one workbook into a new workbook and doing some manipulation of that data. The problems comes when I want the user to save the new workbook. I want the user to (1) enter the name that the new workbook is to be save by; and (2) allow the user to choose the folder that they want to save it in (everyone's elses question was to limit the user to a specific folder).
The code below is what I am using. Entering the file name is OK (step #1 above), but as you can see it always saves the new workbook in the "M:\Offices\" folder (step #2). Actually, for Step #2, I just want to "lead" the user to this main folder ("Offices") and then make the user to choose one of the Offices' subfolders (the actual office names) that the file belongs in before saving? Thank you.
FileName1 = InputBox("Please input filename", "Filename")
ChDir "M:\Offices\"
ActiveWorkbook.SaveAs Filename:="M:\Offices\" & FileName1, FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False