C
cedtech23
How do I stop excel from give this message by answer for my users?
"Data may exist in the sheet(s) selection for deletion. To permanentl
delete the date, Press Delete"
my code is
Code
-------------------
Sub CopyCells()
Range("A1:I15").Select
Selection.Copy
Sheets.Add
ActiveSheet.Paste
Sheets(1).Select
Sheets(1).Name = "LeaveRequest"
Cells.Select
Application.CutCopyMode = False
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = xlAutomatic
End With
ActiveWindow.DisplayHeadings = False
Sheets("LeaveRequested").Select
ActiveWindow.SelectedSheets.Delete
Range("l9").Select
End Sub
"Data may exist in the sheet(s) selection for deletion. To permanentl
delete the date, Press Delete"
my code is
Code
-------------------
Sub CopyCells()
Range("A1:I15").Select
Selection.Copy
Sheets.Add
ActiveSheet.Paste
Sheets(1).Select
Sheets(1).Name = "LeaveRequest"
Cells.Select
Application.CutCopyMode = False
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = xlAutomatic
End With
ActiveWindow.DisplayHeadings = False
Sheets("LeaveRequested").Select
ActiveWindow.SelectedSheets.Delete
Range("l9").Select
End Sub