View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Hiding columns in a named range

Hi
Either of these will hide column 2 in range "tester"

ActiveSheet.Range("tester").Columns(2).Hidden = True

or
ActiveSheet.Range("tester").Cells(1,2).EntireColum n.Hidden = True

There is no Hide method, so this won't work

ActiveSheet.Range("tester").Columns(2).Hide

no matter how tempting it looks!
regards
Paul

On Apr 28, 12:21*pm, malcomio
wrote:
Is there a way of hiding columns in named ranges in VBA? I've got a load of
columns that I want to show and hide, but I might want to add other columns
in the worksheets later, so named ranges would make life easier.

I would have thought it was simple, but I just get an error that I'm "unable
to set hidden property of range class"