Поскольку вы не указали способ сохранения диапазона, я добавил несколько базовых c примеров ниже.
OPT1 - Сохранить как .xlsx
или .csv
Dim cpyRng As Range, newWb As Workbook, sPath As String
Application.DisplayAlerts = False 'remove system alert prompts
Set cpyRng = ThisWorkbook.Sheets("Sheet1").Range("A1:C10") 'Change sheet and range as needed
sPath = ThisWorkbook.Path & "\"
Set newWb = Workbooks.Add
With newWb
cpyRng.Copy
.Sheets("Sheet1").Cells(1, 1).PasteSpecial Paste:=xlPasteValues
.SaveAs Filename:=sPath & "Test" & "_" & Format(Date, "yyyymmdd") & ".xlsx", FileFormat:=51 'change file name to suit
'If you want to save as .csv use
'.SaveAs Filename:=sPath & "Test" & "_" & Format(Date, "yyyymmdd") & ".csv", FileFormat:=6
.Close
End With
'save your workbook and quit Excel
ThisWorkbook.Save = False 'use "True" if you want to save changes
Application.Quit
Application.DisplayAlerts = True 'Turn system alert prompts back on(best practice)
OPT2 - Сохранить как .pdf
Dim cpyRng As Range, sPath As String
Application.DisplayAlerts = False 'remove system alert prompts
Set cpyRng = ThisWorkbook.Sheets("Sheet1").Range("A1:C10") 'Change sheet and range as needed
sPath = ThisWorkbook.Path & "\"
'Change file name to suit
cpyRng.ExportAsFixedFormat Type:=xlTypePDF, Filename:=sPath & "Test" & "_" & Format(Date, "yyyymmdd") & _
".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
Application.DisplayAlerts = True 'Turn system alert prompts back on(best practice)
OPT3 - Сохранить как Word Do c
Dim cpyRng As Range
Set cpyRng = ThisWorkbook.Sheets("Sheet1").Range("A1:C10") 'Change sheet and range as needed
Dim objWord As Object
Set objWord = CreateObject("Word.Application")
cpyRng.Copy
With objWord
.Visible = True
.Documents.Add
.Selection.Paste
End With
Application.CutCopyMode = False
Set objWord = Nothing