Thread: Hiding columns
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Richard Richard is offline
external usenet poster
 
Posts: 21
Default Hiding columns

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