#1   Report Post  
Marlis
 
Posts: n/a
Default saving invoices

I have set up an invoice template. I want to save each invoice in two
seperate workbooks without having to hit "save as". I want one to go into a
folder where I can track payments with the invoice number, and the other to
save using name. How can I do this?

  #2   Report Post  
Excel_Geek
 
Posts: n/a
Default


Try this macro:

I've attached the Excel file I used to write this for your benefit,
too.

Sub Save_Twice_Under_Different_Names()
'
'************************************************* *********
'****************** Code by Excel_Geek ********************
'************************************************* *********
'
' This macro saves the active workbook twice in two different
locations
' with two different names -- the first name being the invoice number,
' and the second being the customer name.

' The "K:\" part of this line should be the complete directory string
' for the location you want to save the file with the Invoice Number
name.
' Range("INVOICE") refers to the cell with the invoice number in it,
which
' I've named "INVOICE".
ActiveWorkbook.SaveAs Filename:="K:\" & Range("INVOICE").Value &
".xls"

' The "K:\" part of this line should be the complete directory string
' for the location you want to save the file with the Customer Name
name.
' Range("INVOICE") refers to the cell with the customer name in it,
which
' I've named "CUSTOMERNAME".
ActiveWorkbook.SaveAs Filename:="K:\" & Range("CUSTOMERNAME").Value &
".xls"

End Sub


+-------------------------------------------------------------------+
|Filename: For_Marlis.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3707 |
+-------------------------------------------------------------------+

--
Excel_Geek


------------------------------------------------------------------------
Excel_Geek's Profile: http://www.excelforum.com/member.php...o&userid=26423
View this thread: http://www.excelforum.com/showthread...hreadid=396978

  #3   Report Post  
Marlis
 
Posts: n/a
Default

I get "invalid file attachment" when I click on your link.

"Excel_Geek" wrote:


Try this macro:

I've attached the Excel file I used to write this for your benefit,
too.

Sub Save_Twice_Under_Different_Names()
'
'************************************************* *********
'****************** Code by Excel_Geek ********************
'************************************************* *********
'
' This macro saves the active workbook twice in two different
locations
' with two different names -- the first name being the invoice number,
' and the second being the customer name.

' The "K:\" part of this line should be the complete directory string
' for the location you want to save the file with the Invoice Number
name.
' Range("INVOICE") refers to the cell with the invoice number in it,
which
' I've named "INVOICE".
ActiveWorkbook.SaveAs Filename:="K:\" & Range("INVOICE").Value &
".xls"

' The "K:\" part of this line should be the complete directory string
' for the location you want to save the file with the Customer Name
name.
' Range("INVOICE") refers to the cell with the customer name in it,
which
' I've named "CUSTOMERNAME".
ActiveWorkbook.SaveAs Filename:="K:\" & Range("CUSTOMERNAME").Value &
".xls"

End Sub


+-------------------------------------------------------------------+
|Filename: For_Marlis.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3707 |
+-------------------------------------------------------------------+

--
Excel_Geek


------------------------------------------------------------------------
Excel_Geek's Profile: http://www.excelforum.com/member.php...o&userid=26423
View this thread: http://www.excelforum.com/showthread...hreadid=396978


  #4   Report Post  
Excel_Geek
 
Posts: n/a
Default


Marlis,

I have noticed that as well. It looks like the link given:

http://www.excelforum.com/attachment.php?postid=3707

is incorrect.

It should be...

http://www.excelforum.com/attachment...achmentid=3707


Notice that the query string at the end should read "attachmentid=3707"
not "postid=3707.

Give it a try...


--
Excel_Geek


------------------------------------------------------------------------
Excel_Geek's Profile: http://www.excelforum.com/member.php...o&userid=26423
View this thread: http://www.excelforum.com/showthread...hreadid=396978

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
How to sum total automatically in more than one sales invoices Dr.H.Subramanian Excel Worksheet Functions 1 May 23rd 05 10:44 AM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM
Need help determining # of invoices Brad Excel Discussion (Misc queries) 1 March 1st 05 06:16 PM
Pivot Tables - "simple" question Eoin Bairead Excel Discussion (Misc queries) 1 February 28th 05 07:07 PM
Invoices Sir Paul Setting up and Configuration of Excel 1 January 12th 05 08:41 PM


All times are GMT +1. The time now is 10:02 PM.

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"