View Full Version : Solved: Unable to Hide Columns ... Why??

06-18-2007, 11:46 AM
I have two workbooks that are structured identically. In one workbook I have no difficulty hiding a group of columns. In the other workbook I get the message ?Unable to set the Hidden property of the Range class? when I try to hide the identical columns with the identical VBA code. Here?s the code used:

Range("AF:AL").Columns.Hidden = True 'Hide the entry What would normally trigger that message?:banghead:

06-18-2007, 12:11 PM
Update: I just discovered that I also cannot hide the columns manually using the FORMAT tab. It gives me the error message "Cannot shift objects off sheet". I'll spend some time trying to find out where/what those objects are and see if I can clean it up. (I hate that message!!)

06-18-2007, 02:09 PM
This article may help

"Cannot shift objects off sheet" error message when you hide columns in Excel

06-19-2007, 12:08 AM
can u attach the file with the codes u had used so that i can see where is the problem in executing the code

07-22-2007, 02:52 PM
Hey, XLD, good reference (I printed it out for next time).
Thanx a lot.

07-22-2007, 02:54 PM
I have a plethora of links to KB articles <G>.

Glad it helped.