I wonder why the following line gave
"Application-defined or Object-defined error"
If Sheet6
is selected, this line runs fine - no error message. However, if another sheet is selected, Excel throws the above error message.
ThisWorkbook.Sheets("Sheet6").Range(Cells(1, 2), Cells(12, 1000).End(xlToLeft)).ClearContents