View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Stupid Syntax Question

Hi,

If the activesheet is a chart then you will need to change Columns to Range.

Sheets("Yr Summary - Chart").Range("E:E").EntireColumn.Hidden = True

this also works
Sheets("Yr Summary - Chart").columns(5).entirecolumn.hidden=true

Cheers
Andy

Chris Gorham wrote:
Hi,

silly syntax question....

these statements work...

Sheets("Yr Summary - Chart").Select
Columns("E:E").EntireColumn.Hidden = True
Sheets("Chart - Yr Forecast").Select

this for some reason doesn't...

Sheets("Yr Summary - Chart").Columns("E:E").EntireColumn.Hidden = True

what's wrong...??

Chris


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info