I'm trying to simplify this function from the following
Public Sub freezeRow(sheetAct, sheetType As String, sheetRow As Integer)
sheetAct.Activate 'Activate sheet
ActiveWindow.FreezePanes = False 'Unfreeze all rows
Select Case sheetType
Case "Sum"
'Freeze the Summary spread sheet after row 9
sheetAct.Range("10:10").Select
Case "Data"
'Freeze the Summary spread sheet after row 2
sheetAct.Range("3:3").Select
End Select
ActiveWindow.FreezePanes = True 'Freeze selected rows
End Sub
to something like this
Public Sub freezeRow(sheetAct, sheetType As String, sheetRow As Integer)
sheetAct.Activate 'Activate sheet
ActiveWindow.FreezePanes = False 'Unfreeze all rows
sheetAct.Range("sheetRow:sheetRow").Select
ActiveWindow.FreezePanes = True 'Freeze selected rows
End Sub
I can't seem to remove the quotes in the range
and when I run it tosses some obscure error