Thread: Hiding columns
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Hiding columns

Is that worksheet protected in any way?

--

HTH

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


"Richard" wrote in message
ups.com...
This is driving me mad. Can anyone suggest what the problem may be.

I have a simple line of code

If bMy = False Then
Worksheets("Cim").Range("A1:EY1").EntireColumn.Hid den = True

Which keeps falling over in the second part with the "Unable to set the
Hidden property of the Range Class" message.

Using the Immediate window I can succesfully hide A1:ET with:-
Range("a1:et1").EntireColumn.Hidden=true

but as soon as I change this to
Range("a1:eu1").EntireColumn.Hidden=true

I get the error message.

It suggests that there's some characteristic of column EU that it
doesn't like, but I'm at a loss to understand what it may be.

Any ideas??

Usual TIA