Saving Both Sheeting in a workbook

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
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Which other worksheet do you want to copy/save?
 
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,790
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top