runtime error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I got a type mismatch run-time error on the line to set the range.
I just want to hide columns 0 - Z or columns 16-26.
Can you help me set the range right?
thanks,


Sub HideXtraCells()
Dim rng As Range
' HideCells Macro

Set rng = Columns("0:Z")

rng.EntireColumn.Hidden = True

End Sub
 
I got the answer, thanks anyways.

Sub HideXtraCells()

' HideCells Macro



Columns("O:Z").EntireColumn.Hidden = True

End Sub
 
You are right thanks, I still didn't have the answer but almost. i wondered
why it crashed.
 
Back
Top