ExcelNovice
Well-known Member
- Joined
- May 12, 2002
- Messages
- 583
I'm using the code below, but keep getting the following error:
Run-time error '1004'
Private Sub CommandButton31_Click()
ActiveSheet.Unprotect Password:="password1"
Range("AA57:AA57").Select
Range("AA57:AA57").Activate
Selection.RowHeight = 12.75
Range("AA58:AA58").Select
Range("AA58:AA58").Activate
Selection.RowHeight = 12.75
Range("AA59:AA59").Select
Range("AA59:AA59").Activate
Selection.RowHeight = 13.5
ActiveSheet.Protect Password:="password1"
End sub
Any idea on what I'm doing wrong and how to correct the problem?
Run-time error '1004'
Private Sub CommandButton31_Click()
ActiveSheet.Unprotect Password:="password1"
Range("AA57:AA57").Select
Range("AA57:AA57").Activate
Selection.RowHeight = 12.75
Range("AA58:AA58").Select
Range("AA58:AA58").Activate
Selection.RowHeight = 12.75
Range("AA59:AA59").Select
Range("AA59:AA59").Activate
Selection.RowHeight = 13.5
ActiveSheet.Protect Password:="password1"
End sub
Any idea on what I'm doing wrong and how to correct the problem?