Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a file with a macro without a path
I am using 2007 and have developed a spreadsheet template that we use for
various customers. I would like to have input boxes pop up the first time that the file is saved asking for customer name. I would then like this passed on to the file name, but we do not save all of the spreadsheets in one particular folder. Each customer has their folder with sometimes many different subfolders in each. My question is: Can I generate a file name but still have the save-as dialog box pop up to pick what location I want the file saved to? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a file with a macro without a path
Take a look at Chip Pearson's Browse For Folder code. You can browse for
the folder to save to and then concatenate the file name to the end of it when you save. http://www.cpearson.com/excel/BrowseFolder.aspx -- HTH, Barb Reinhardt "Cmenkedi" wrote: I am using 2007 and have developed a spreadsheet template that we use for various customers. I would like to have input boxes pop up the first time that the file is saved asking for customer name. I would then like this passed on to the file name, but we do not save all of the spreadsheets in one particular folder. Each customer has their folder with sometimes many different subfolders in each. My question is: Can I generate a file name but still have the save-as dialog box pop up to pick what location I want the file saved to? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a file with a macro without a path
Thank You I will check it out.
"Barb Reinhardt" wrote: Take a look at Chip Pearson's Browse For Folder code. You can browse for the folder to save to and then concatenate the file name to the end of it when you save. http://www.cpearson.com/excel/BrowseFolder.aspx -- HTH, Barb Reinhardt "Cmenkedi" wrote: I am using 2007 and have developed a spreadsheet template that we use for various customers. I would like to have input boxes pop up the first time that the file is saved asking for customer name. I would then like this passed on to the file name, but we do not save all of the spreadsheets in one particular folder. Each customer has their folder with sometimes many different subfolders in each. My question is: Can I generate a file name but still have the save-as dialog box pop up to pick what location I want the file saved to? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a file with a macro without a path
I have tried your suggestion and everything works except for 2 problems.
1. How do I set up the macro to run whenever save-as is called by the program? 2. I need to save the workbook with macros enabled. I have the right file extension but it gives me an error message that I will loose the macros. thanks "Cmenkedi" wrote: I am using 2007 and have developed a spreadsheet template that we use for various customers. I would like to have input boxes pop up the first time that the file is saved asking for customer name. I would then like this passed on to the file name, but we do not save all of the spreadsheets in one particular folder. Each customer has their folder with sometimes many different subfolders in each. My question is: Can I generate a file name but still have the save-as dialog box pop up to pick what location I want the file saved to? Thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a file with a macro without a path
Do a search for Workbook_BeforeSave. That's where you can do things when
the user attempts to save the workbook. You may not need the other code. I thought you were going to have them save at another time during execution. I'm also guessng you are using 2007. If you want to save it as a macro enabled workbook, save as a .xlsm. -- HTH, Barb Reinhardt "Cmenkedi" wrote: I have tried your suggestion and everything works except for 2 problems. 1. How do I set up the macro to run whenever save-as is called by the program? 2. I need to save the workbook with macros enabled. I have the right file extension but it gives me an error message that I will loose the macros. thanks "Cmenkedi" wrote: I am using 2007 and have developed a spreadsheet template that we use for various customers. I would like to have input boxes pop up the first time that the file is saved asking for customer name. I would then like this passed on to the file name, but we do not save all of the spreadsheets in one particular folder. Each customer has their folder with sometimes many different subfolders in each. My question is: Can I generate a file name but still have the save-as dialog box pop up to pick what location I want the file saved to? Thanks |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a file with a macro without a path
Thank you but I don't want it asking for them every time you save the workbook.
Yes I am using 2007 and have the default file time set to ".xlsm" "Barb Reinhardt" wrote: Do a search for Workbook_BeforeSave. That's where you can do things when the user attempts to save the workbook. You may not need the other code. I thought you were going to have them save at another time during execution. I'm also guessng you are using 2007. If you want to save it as a macro enabled workbook, save as a .xlsm. -- HTH, Barb Reinhardt "Cmenkedi" wrote: I have tried your suggestion and everything works except for 2 problems. 1. How do I set up the macro to run whenever save-as is called by the program? 2. I need to save the workbook with macros enabled. I have the right file extension but it gives me an error message that I will loose the macros. thanks "Cmenkedi" wrote: I am using 2007 and have developed a spreadsheet template that we use for various customers. I would like to have input boxes pop up the first time that the file is saved asking for customer name. I would then like this passed on to the file name, but we do not save all of the spreadsheets in one particular folder. Each customer has their folder with sometimes many different subfolders in each. My question is: Can I generate a file name but still have the save-as dialog box pop up to pick what location I want the file saved to? Thanks |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a file with a macro without a path
On the Before_Save block check the existing file name if it is not your
standard file name then the user already save it and you skip your input boxes. Unless I'm missing something. -- Rui "Cmenkedi" wrote in message ... I am using 2007 and have developed a spreadsheet template that we use for various customers. I would like to have input boxes pop up the first time that the file is saved asking for customer name. I would then like this passed on to the file name, but we do not save all of the spreadsheets in one particular folder. Each customer has their folder with sometimes many different subfolders in each. My question is: Can I generate a file name but still have the save-as dialog box pop up to pick what location I want the file saved to? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving file when path is unknown | Excel Programming | |||
Saving txt file from excel by specifying path - drop down directory explorer | Excel Programming | |||
Force Path for File Saving | Excel Programming | |||
Formula too long - new file path is shorter than old file path - Excel 2003 | Excel Worksheet Functions | |||
Saving a file to a different path | Excel Programming |