Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving Worksheets Mike Excel Programming 3 September 20th 07 07:12 AM
Saving Multiple Worksheets Sherry Excel Discussion (Misc queries) 4 May 17th 07 05:49 PM
Saving worksheets as filenames AmyTaylor[_53_] Excel Programming 2 April 25th 06 06:57 PM
Saving worksheets Tkaminski Excel Worksheet Functions 1 April 18th 05 03:49 PM
Saving Worksheets D.Parker Excel Programming 2 March 29th 05 05:25 AM


All times are GMT +1. The time now is 05:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"