View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Maximum number of hidden columns

My best guess would be that you are trying to hide columns with merged cells
(spanning columns) in them. You can not hide half of a merged cell... One
question though is why do you have so many ranges to hide when the ranges
form one large continuous block of columns? You could try...

Columns("DI:GU").Hidden = True
--
HTH...

Jim Thomlinson


"Cheer-Phil-ly" wrote:

Don,

The Excel file is almost 9mb and has private and confidential banking data
so I can't send you the file.

Does it matter if the columns have data or not? In my case they all have
some data in some of the 960 rows.

"Don Guillett" wrote:

I just tested both of yours and got no error on either
send be your workbook if desired.
--
Don Guillett
SalesAid Software

"Cheer-Phil-ly" wrote in message
...
I have tried both of these...
Range("DI:GU").EntireColumn.Hidden = True
Range("DI:DU,DV:EH,EI:EU,EV:FH,FI:FU,FV:GH,GI:GU") .EntireColumn.Hidden =
True
Neither of them works.... same error.

"Don Guillett" wrote:

try this idea instead
Range("A:C,E:F,H:J").EntireColumn.Hidden = True

--
Don Guillett
SalesAid Software

"Cheer-Phil-ly" wrote in message
...
I have the following code whereby I am trying to hide 91 columns, but it
croakes on
the --- line below
Columns("DI:DU").Hidden = True
Columns("DV:EH").Hidden = True
Columns("EI:EU").Hidden = True
--- Columns("EV:FH").Hidden = True
Columns("FI:FU").Hidden = True
Columns("FV:GH").Hidden = True
Columns("GI:GU").Hidden = True

The error is "Unable to set the hidden property of the Range class",
error
1004.

Is there a maximum number of columns that can be hidden?