Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
I have written a macro that uses the data-analysis tool to creat a
histogram. It turns out too small and I have to manually enlarge it. I can't seem to do it in the macro, because one has to select thee chart and I can't figure out how to do this since it reuires a chart number to select it. And of course the number changes every time the macro is run. So my question is: In a VBA macro how do I select the only chart when I will not know it's number. Help will be appreciated. Thank you. |
#2
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi,
Some like this will select the most recent chart object on the activesheet. Dim objCht as ChartObject set objCht = activesheet.chartobjects(activesheet.chartobjects. count) objcht.width = 350 objcht.height = 250 Cheers Andy jtomdd wrote: I have written a macro that uses the data-analysis tool to creat a histogram. It turns out too small and I have to manually enlarge it. I can't seem to do it in the macro, because one has to select thee chart and I can't figure out how to do this since it reuires a chart number to select it. And of course the number changes every time the macro is run. So my question is: In a VBA macro how do I select the only chart when I will not know it's number. Help will be appreciated. Thank you. |
#3
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
jtomdd -
If you do the resizing immediately after the chart is created, maybe you could use ActiveChart to refer to it. Instead of using the Histogram tool of the Analysis ToolPak, you may want to investigate the VBA code of my free Better Histogram add-in, available from http://www.treeplan.com. - Mike http://www.mikemiddleton.com "jtomdd" wrote in message oups.com... I have written a macro that uses the data-analysis tool to creat a histogram. It turns out too small and I have to manually enlarge it. I can't seem to do it in the macro, because one has to select thee chart and I can't figure out how to do this since it reuires a chart number to select it. And of course the number changes every time the macro is run. So my question is: In a VBA macro how do I select the only chart when I will not know it's number. Help will be appreciated. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
unhide menu bar in excel - just disappeared | Setting up and Configuration of Excel | |||
formula structure building ? check under the excel forum.... | Excel Discussion (Misc queries) | |||
enable automatic refresh | Excel Worksheet Functions | |||
Histogram - Excel doesn't accept my bin values, uses default | Excel Discussion (Misc queries) |