I am trying to hide or unhide the same rows on multiple sheets. I get an object expected error on this code.
VBA Code:
Sub ToggleRows()
Dim arr As Variant
Dim i As Integer
arr = Array("YYC P&L", "YEG P&L")
For i = LBound(arr) To UBound(arr)
arr(i).Rows("16:50").Hidden = Not arr(i).Rows("16:50").Hidden
Next
End Sub