Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving worksheets
I have a large number of worksheets (invoices!) I wish to save them to a
specific folder which as it happens has the same name (number) as the invoice and already contains data about the sale. Is there anyway I can save these worksheets without having to go through 'the save as' procedure and search for a thousand files etc? -- Bev |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving worksheets
Not sure how you are presently performing the task. A macro can be writen to
open the file directly without doing any searches for example see below. Not sure from youor description if the file(s) the data about the sales is the same file that you want to do the Saveas or if you want to create a new file with the updated info. Folder = "C:\temp\" for each Ws in thisworkbook.sheets Invoice = Workbooks.open(filename:=Folder & Ws.name) 'perform your operations Invoice.close next Ws "Bev" wrote: I have a large number of worksheets (invoices!) I wish to save them to a specific folder which as it happens has the same name (number) as the invoice and already contains data about the sale. Is there anyway I can save these worksheets without having to go through 'the save as' procedure and search for a thousand files etc? -- Bev |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving worksheets
Thanks for your response Let me explain. I do a large number of invoices on
behalf of a sales force. When each of these have been completed i need to file them to an individual file which contains other date about this 'sale' what i would like to do is find a way of filing this worksheet to a specific file without doing 'save as@ mainly because there are already a couple of thousand files already in use which are difficult to find and it's so easy to pick th ewrong one whilst looking at such a large list So on any open current worksheet (an invoice in this case) what can I integrate to save the worksheet to a specific file (virtually) automatically? Kind regards-- Bev "Joel" wrote: Not sure how you are presently performing the task. A macro can be writen to open the file directly without doing any searches for example see below. Not sure from youor description if the file(s) the data about the sales is the same file that you want to do the Saveas or if you want to create a new file with the updated info. Folder = "C:\temp\" for each Ws in thisworkbook.sheets Invoice = Workbooks.open(filename:=Folder & Ws.name) 'perform your operations Invoice.close next Ws "Bev" wrote: I have a large number of worksheets (invoices!) I wish to save them to a specific folder which as it happens has the same name (number) as the invoice and already contains data about the sale. Is there anyway I can save these worksheets without having to go through 'the save as' procedure and search for a thousand files etc? -- Bev |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving worksheets
You still need to do a SAVEAS. But the SAVEAS is a VBA programming
instruction rather than a Manual operation. In VBA you can create a filename from strings that can prevent the file being saved under the wrong name For example, a lot of people save files using the current data. This is how they do it Folder = "c:\Mydata\" BasefileName = "Company ABC " 'now create a string from todays date TodaysDate = Format(Date(),"MMM_DD_YY" FName = Folder & BaseFileName & TodaysDate & ".xls" Thisworkbook.saveas filename:=FName From this example you can see that the filename the saveas uses is a concatenation of different strings. "Bev" wrote: Thanks for your response Let me explain. I do a large number of invoices on behalf of a sales force. When each of these have been completed i need to file them to an individual file which contains other date about this 'sale' what i would like to do is find a way of filing this worksheet to a specific file without doing 'save as@ mainly because there are already a couple of thousand files already in use which are difficult to find and it's so easy to pick th ewrong one whilst looking at such a large list So on any open current worksheet (an invoice in this case) what can I integrate to save the worksheet to a specific file (virtually) automatically? Kind regards-- Bev "Joel" wrote: Not sure how you are presently performing the task. A macro can be writen to open the file directly without doing any searches for example see below. Not sure from youor description if the file(s) the data about the sales is the same file that you want to do the Saveas or if you want to create a new file with the updated info. Folder = "C:\temp\" for each Ws in thisworkbook.sheets Invoice = Workbooks.open(filename:=Folder & Ws.name) 'perform your operations Invoice.close next Ws "Bev" wrote: I have a large number of worksheets (invoices!) I wish to save them to a specific folder which as it happens has the same name (number) as the invoice and already contains data about the sale. Is there anyway I can save these worksheets without having to go through 'the save as' procedure and search for a thousand files etc? -- Bev |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Worksheets | Excel Programming | |||
Saving Multiple Worksheets | Excel Discussion (Misc queries) | |||
Saving worksheets as filenames | Excel Programming | |||
Saving worksheets | Excel Worksheet Functions | |||
Saving Worksheets | Excel Programming |