Hello, I want to copy 3 worksheets to a new workbook, but exclude a range from one of the worksheets (and any buttons on the worksheet as well. I want to exclude J1:U2 on "Metric Report" Is there a way to do this?
this is what I am using right now
this is what I am using right now
Code:
Sub ThreeSheets()
With ActiveWorkbook.Sheets(Array("Metric Report", "Rubric", "Counts"))
.Copy
ActiveWorkbook.SaveAs Filename:=GetFolder & Application.PathSeparator & "Metric Report.xlsx", FileFormat:=51
End With
End Sub
Function GetFolder() As String
Dim fldr As FileDialog
Dim sItem As String
Set fldr = Application.FileDialog(msoFileDialogFolderPicker)
With fldr
.Title = "Select a Folder"
.AllowMultiSelect = False
.InitialFileName = Application.DefaultFilePath
If .Show <> -1 Then GoTo NextCode
sItem = .SelectedItems(1)
End With
NextCode:
GetFolder = sItem
Set fldr = Nothing
End Function
Last edited: