SOLVED Unable to set the Hidden property of the range class

cadence

Well-known Member
Joined
Dec 6, 2005
Messages
528
Hello all,

Run-time-error 1004
Unable to set the Hidden property of the range class

if you ever get this message and can't figure out how to solve it, let me suggest this.

It mainly comes when trying to hide columns. there are two solutions
the obvious one is
The worksheet is protected, so you'll need to unprotect it or run a routine that does it for you

The other is that you may have comments on some of the cell that are to be hidden. EXCEL DOES NOT LIKE THIS. The only solution I found was to remove the comments. Perhaps those better than I know of a work around, but blunt force did the trick.

Hope it will benefit someone pulling their hair out. (mine is growing back)
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

M1111

New Member
Joined
Feb 3, 2017
Messages
6
10 years later and this has saved me, thank you!

I had some comment boxes floating in the range which were causing this error.
 

robertjude

New Member
Joined
Dec 5, 2019
Messages
6
Office Version
365
Platform
Windows
hi! I am also having this problem. I think there's no comment boxes in my workbook. I already used the "Show Comments" function of excel and there's nothing showing. But I still encounter the above mentioned error whenever my worksheets are protected. Hoping someone can help. Thanks!
 

Watch MrExcel Video

Forum statistics

Threads
1,095,786
Messages
5,446,493
Members
405,404
Latest member
clead

This Week's Hot Topics

Top