Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Chris,
this for some reason doesn't... Sheets("Yr Summary - Chart").Columns("E:E").EntireColumn.Hidden = True The code works for me. What error do you encounter? --- Regards, Norman "Chris Gorham" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
right...this has prompted a little investigation by me...
the code works fine as long as Sheets("Chart - Yr Forecast") - which is the active sheet at the time the routine is called - is a worksheet... however it isn't - its a chart, and then for some reason it fails. all I'm doing is running a little code to hide a column of data whilst looking at a chart - this has the effect of knocking out one of the years in the chart. Sheets("Chart - Yr Forecast") is the chart and Sheets("Yr Summary - Chart") is a worksheet containing the data being plotted.... Suggestions welcome....Chris "Norman Jones" wrote: Hi Chris, this for some reason doesn't... Sheets("Yr Summary - Chart").Columns("E:E").EntireColumn.Hidden = True The code works for me. What error do you encounter? --- Regards, Norman "Chris Gorham" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All of these work. Yours should as well.
Sheets("sheet7").Columns("e:e").EntireColumn.Hidde n = True Sheets("sheet7").Columns(5).Hidden = True Sheets("sheet7").Columns("e").Hidden = True Sheets("sheet7").Range("e1").EntireColumn.Hidden = True -- Don Guillett SalesAid Software "Chris Gorham" wrote in message ... 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
big stupid question | Excel Discussion (Misc queries) | |||
Probably a Stupid Question | Excel Discussion (Misc queries) | |||
stupid question | New Users to Excel | |||
Stupid Question | Excel Worksheet Functions | |||
Stupid, stupid question.... | Excel Programming |