bamaisgreat
Well-known Member
- Joined
- Jan 23, 2012
- Messages
- 831
- Office Version
- 365
- Platform
- Windows
Getting Errors when I run the code below. If i different data in the cells from when I recorded the macro I get errors.
Code:
Sub Clear_Sheet()
'
' Clear_Sheet Macro
'
'
Range("A5:A39,C5:H39,K5:P39,T5:AA39,K1:O1,F1:I1,F2:I2,Z2").Select
Range("Z2").Activate
ActiveWindow.SmallScroll Down:=18
Range( _
"A5:A39,C5:H39,K5:P39,T5:AA39,K1:O1,F1:I1,F2:I2,Z2,E42:P59,U42:W42,Q42:R59,U42:AA59" _
).Select
Range("U42").Activate
ActiveWindow.SmallScroll Down:=-33
Selection.ClearContents
ActiveWindow.SmallScroll Down:=6
Range("S42:T42").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False
Range("E42").Select
ActiveCell.FormulaR1C1 = "5"
Range("Q42:R42").Select
ActiveCell.FormulaR1C1 = "5"
Range("E42").Select
Selection.ClearContents
Range("Q42:R42").Select
Selection.ClearContents
End Sub