Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 4
Default Sizing individual charts with a macro

Hi,

I'm kind of flying along through VB on a wing and a prayer, so would really
appreciate some help with sizing individual charts in Excel. I have found
some coding for resizing all the charts on a sheet, but really need to be
able to click on a chart and resize them individually.

I can manage it as long as I have selected the chart with the Select cursor
(from the Drawing menu) and it is seen as a shape, but if I am in the chart
in editing mode, I get a run-time error 438, and the message 'Object doesn't
support this property or method'.

I'm in Excel 2003.

Many thanks,
Eleanor
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Sizing individual charts with a macro

Hi,

If the chart is active then use the Parent reference to apply sizes

This will make the chart 10% wider.

ActiveChart.Parent.Width = ActiveChart.Parent.Width * 1.1

Cheers
Andy

Ellinoz wrote:
Hi,

I'm kind of flying along through VB on a wing and a prayer, so would really
appreciate some help with sizing individual charts in Excel. I have found
some coding for resizing all the charts on a sheet, but really need to be
able to click on a chart and resize them individually.

I can manage it as long as I have selected the chart with the Select cursor
(from the Drawing menu) and it is seen as a shape, but if I am in the chart
in editing mode, I get a run-time error 438, and the message 'Object doesn't
support this property or method'.

I'm in Excel 2003.

Many thanks,
Eleanor


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 4
Default Sizing individual charts with a macro

Thanks, that's really helpful. How would I assign a fixed height and width
to this? I tried using points, and the chart nigh on disappeared to about
0.5x0.5cm!



"Andy Pope" wrote:

Hi,

If the chart is active then use the Parent reference to apply sizes

This will make the chart 10% wider.

ActiveChart.Parent.Width = ActiveChart.Parent.Width * 1.1

Cheers
Andy

Ellinoz wrote:
Hi,

I'm kind of flying along through VB on a wing and a prayer, so would really
appreciate some help with sizing individual charts in Excel. I have found
some coding for resizing all the charts on a sheet, but really need to be
able to click on a chart and resize them individually.

I can manage it as long as I have selected the chart with the Select cursor
(from the Drawing menu) and it is seen as a shape, but if I am in the chart
in editing mode, I get a run-time error 438, and the message 'Object doesn't
support this property or method'.

I'm in Excel 2003.

Many thanks,
Eleanor


--

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

  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Sizing individual charts with a macro

Not sure what value you used.

This will nake the chart as wide as the columns D:J

ActiveChart.Parent.Width=range("D:J").Width

Cheers
Andy

Ellinoz wrote:
Thanks, that's really helpful. How would I assign a fixed height and width
to this? I tried using points, and the chart nigh on disappeared to about
0.5x0.5cm!



"Andy Pope" wrote:


Hi,

If the chart is active then use the Parent reference to apply sizes

This will make the chart 10% wider.

ActiveChart.Parent.Width = ActiveChart.Parent.Width * 1.1

Cheers
Andy

Ellinoz wrote:

Hi,

I'm kind of flying along through VB on a wing and a prayer, so would really
appreciate some help with sizing individual charts in Excel. I have found
some coding for resizing all the charts on a sheet, but really need to be
able to click on a chart and resize them individually.

I can manage it as long as I have selected the chart with the Select cursor
(from the Drawing menu) and it is seen as a shape, but if I am in the chart
in editing mode, I get a run-time error 438, and the message 'Object doesn't
support this property or method'.

I'm in Excel 2003.

Many thanks,
Eleanor


--

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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sizing charts Rob graham Excel Discussion (Misc queries) 2 September 9th 06 04:44 PM
MACRO HELP: Save All Sheets To Individual Workbooks Zorro Excel Discussion (Misc queries) 3 September 2nd 06 07:06 PM
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan Excel Discussion (Misc queries) 4 June 17th 06 04:13 PM
individual charts Raymond Willis Charts and Charting in Excel 1 December 1st 05 01:15 PM
Individual labels to data point in Excel charts Sverre Rolseth Charts and Charting in Excel 2 December 8th 04 12:55 PM


All times are GMT +1. The time now is 08:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"