I'm using the following code which copies the active worksheet to a new workbook.
It copies and pastes the whole sheet range. I have the sheet named "invoice" hidden.
How could I make the code to copy and paste the range A1:AR27 from the sheet invoice to a new workbook without copying the formulas?
Code: Select all
Sub CopySheetToClosedWB()
Application.ScreenUpdating = False
Cells.Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.Dialogs(xlDialogSaveAs).Show
Application.ScreenUpdating = True
End Sub