unable to set hidden property

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.
 
F

Fredrik Wahlgren

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
 
B

Bob Phillips

Try

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


--

HTH

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top