unable to set hidden property

  • Thread starter Thread starter davegb
  • Start date Start date
D

davegb

I copied this code straight from this NG, but it doesn't run for me.

Sub HideCol()
Range("H:H").Hidden = True

End Sub

I get an error, "Unable to set the hidden property of the range class".

Is is someting to do with the version of XL? I'm using XL2000.
 
davegb said:
I copied this code straight from this NG, but it doesn't run for me.

Sub HideCol()
Range("H:H").Hidden = True

End Sub

I get an error, "Unable to set the hidden property of the range class".

Is is someting to do with the version of XL? I'm using XL2000.

Wild guess. The worksheet or workbook is protected.

/Fredrik
 
Try

columns("H:H").Hidden = True


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Back
Top