SamAnnElizabeth
New Member
- Joined
- Mar 15, 2013
- Messages
- 34
I'm trying to record a macro to return my sheet to the print display. I recorded it and then edited in visual basic. Here's the code:
Sub Hide()
'
' Hide Macro
'
'
Rows("1:60").Select
Selection.EntireRow.Hidden = False
Columns("A:AZ").Select
Selection.EntireColumn.Hidden = False
Rows("34:51").Select
Selection.EntireRow.Hidden = True
Rows("3:9").Select
Selection.EntireRow.Hidden = True
Columns("K:K").Select
Selection.EntireColumn.Hidden = True
Columns("P:P").Select
Selection.EntireColumn.Hidden = True
Columns("AG:AX").Select
Selection.EntireColumn.Hidden = True
Range("A1").Select
End Sub
When I run it, it hides columns G:Q and Z:AX. The rows are right. I have no merged cells in the range. Does anyone have any ideas what I could do differently? Thanks!
Sub Hide()
'
' Hide Macro
'
'
Rows("1:60").Select
Selection.EntireRow.Hidden = False
Columns("A:AZ").Select
Selection.EntireColumn.Hidden = False
Rows("34:51").Select
Selection.EntireRow.Hidden = True
Rows("3:9").Select
Selection.EntireRow.Hidden = True
Columns("K:K").Select
Selection.EntireColumn.Hidden = True
Columns("P:P").Select
Selection.EntireColumn.Hidden = True
Columns("AG:AX").Select
Selection.EntireColumn.Hidden = True
Range("A1").Select
End Sub
When I run it, it hides columns G:Q and Z:AX. The rows are right. I have no merged cells in the range. Does anyone have any ideas what I could do differently? Thanks!