Thread: pivot table?
View Single Post
  #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=3706 |
+-------------------------------------------------------------------+

--
Excel_Geek


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