با سلام من این دستور رو برای بک آپ گیری از یکی از شیت هام (شیت 9) دارم حالا اگر بخوام فقط مثلاً از رنج a1:y100همین شیت بک آب بگیر چیکار کنم
کد HTML:
Sub GetBackupAccident() sal = Year(Date) mah = Month(Date) roz = Day(Date) todaydate = sal & mah & roz On Error GoTo exitsub Set FolderName = Application.FileDialog(msoFileDialogFolderPicker) With FolderName .Show If .SelectedItems.Count = 0 Then MsgBox "No Folder is Selected" End Else strPath = .SelectedItems(1) End If End With fldr = strPath TheAddress = fldr & "" & "R.Accident" & todaydate & ".xlsx" Sheets(9).Copy ActiveWorkbook.SaveAs Filename:=TheAddress, _ FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False ActiveWorkbook.Close MsgBox "Saved!" exitsub: End Sub

