Afternoon all,
Hopefully a very quick one, I have some working code which (when run) auto resizes the row heights on 4 named sheets (Sheet1/2/3/4) to '45'.
Is there a way that I can resize sheet 4' to a different height to the others?
Thanks
Hopefully a very quick one, I have some working code which (when run) auto resizes the row heights on 4 named sheets (Sheet1/2/3/4) to '45'.
Is there a way that I can resize sheet 4' to a different height to the others?
Thanks
Private Sub Workbook_Open() |
Dim Ws As Worksheet |
Dim Crit As String |
Application.ScreenUpdating = False |
Crit = Sheets("Selector").Range("A1").Value |
For Each Ws In Worksheets |
Select Case Ws.Name |
Case "Sheet1", "Sheet2", "Sheet3", "Sheet4" |
Ws.UsedRange.AutoFilter 1, "<>" & Crit |
Ws.AutoFilter.Range.Offset(1).EntireRow.Delete |
Ws.AutoFilterMode = False |
Ws.Range("A2:A" & ws.Rows.Count).RowHeight = 45 |
End Select |
Next Ws |
With Sheets("Selector") |
.Range("A1").Value = Crit |
.Rows.RowHeight = 45 |
.Visible = xlHidden |
End With |
End Sub |