03856me
Active Member
- Joined
- Apr 4, 2008
- Messages
- 297
After research I have come up with this code to dump my data to another file and save it, then clear the information and formatting that is not needed. However, the row identified below with '<===== errors out ever time with the error: Delete method of Range class failed
Your help is greatly apprecaited ---
Your help is greatly apprecaited ---
Code:
Sub ProcessNewFile()
Application.ScreenUpdating = False
Worksheets("data").Select
ActiveSheet.Cells.EntireColumn.Hidden = False
ActiveSheet.Cells.EntireRow.Hidden = False
Range("R:R,T:T,V:V,X:X,Z:Z,AB:KN").Delete '<=====
ActiveSheet.Shapes("ReportMenu").Delete
Worksheets("Hold").Select
ActiveSheet.Shapes("Rounded Rectangle 1").Delete
Range("I:J").Delete
Range("B9").Validation.Delete
Range("A1:AC166").Interior.ColorIndex = xlColorIndexNone
ActiveWorkbook.Save
ActiveWorkbook.Close
Worksheets("data").Visible = False
Worksheets("Hold").Visible = False
MsgBox "YOUR NEW REPORT HAS BEEN SAVED"
Application.ScreenUpdating = True
End Sub