Rabbitiswise70
New Member
- Joined
- Jun 20, 2018
- Messages
- 5
This is the Current Code I am running for my "Next Invoice", the only problem I am Having it only save one of the two work sheets I am using...Can you give a not so smart guy a little help and saving both "Invoice" worksheet and CustomerCopy" worksheet?
Sub NextInvoice()
Range("J1").Value = Range("J1").Value + 1
Range("H1,H3,H4,H5,J5,H6,J6,B7,D7,G7,J7,B8,F8,G8,I8,a10:a28,B10:B28,D10:D28,K10:M28,A30:a32,I30:I32,l30:L32,E34,A35:A40,I35:I40,B41,A42:A48,J45,K45,I46,J46").ClearContents
End Sub
Sub SaveInvWithNewName()
Dim NewFN As Variant
' Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "C:\Users\Gary\Documents\ATI\Quotes\2018\18_" & Range("J1").Value & "_" & Range("h3").Value & "_" & Range("g7").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
End Sub
Sub NextInvoice()
Range("J1").Value = Range("J1").Value + 1
Range("H1,H3,H4,H5,J5,H6,J6,B7,D7,G7,J7,B8,F8,G8,I8,a10:a28,B10:B28,D10:D28,K10:M28,A30:a32,I30:I32,l30:L32,E34,A35:A40,I35:I40,B41,A42:A48,J45,K45,I46,J46").ClearContents
End Sub
Sub SaveInvWithNewName()
Dim NewFN As Variant
' Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "C:\Users\Gary\Documents\ATI\Quotes\2018\18_" & Range("J1").Value & "_" & Range("h3").Value & "_" & Range("g7").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
End Sub