Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Setting size

I have a problem when using a macro to set size of a chart. I acnnot use the
macro recorder so I want to be able to set size in code. My code is:

Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlUserDefined, TypeName:="Standard"
........
ActiveChart.Shapes.ChartArea.Height = 1000

As you may see the last line is faulty..I just dont know how to write it.
What I want to do is to set the size (height and width) in the code. If you
know how to solve this please help me.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Setting size

Will this work for you?

ActiveChart.PlotArea.Width = ???
ActiveChart.PlotArea.Height = ???

Replace the ???s with whatever numbers you need.


Mark


Freddie Mac wrote:
I have a problem when using a macro to set size of a chart. I acnnot use the
macro recorder so I want to be able to set size in code. My code is:

Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlUserDefined, TypeName:="Standard"
.......
ActiveChart.Shapes.ChartArea.Height = 1000

As you may see the last line is faulty..I just dont know how to write it.
What I want to do is to set the size (height and width) in the code. If you
know how to solve this please help me.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Setting size

great thanks!!!!! Do you know how to set the size for the whole chart area
also? Would be awsome!

"Mark Driscol" skrev:

Will this work for you?

ActiveChart.PlotArea.Width = ???
ActiveChart.PlotArea.Height = ???

Replace the ???s with whatever numbers you need.


Mark


Freddie Mac wrote:
I have a problem when using a macro to set size of a chart. I acnnot use the
macro recorder so I want to be able to set size in code. My code is:

Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlUserDefined, TypeName:="Standard"
.......
ActiveChart.Shapes.ChartArea.Height = 1000

As you may see the last line is faulty..I just dont know how to write it.
What I want to do is to set the size (height and width) in the code. If you
know how to solve this please help me.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Setting size

First, make sure your Chart's page setup is not set to fill up the
entire page with the Chart.

ActiveChart.PageSetup.ChartSize = xlScreenSize

After that, you can use

ActiveChart.ChartArea.Height = ???
ActiveChart.ChartArea.Width = ???

Mark


Freddie Mac wrote:
great thanks!!!!! Do you know how to set the size for the whole chart area
also? Would be awsome!

"Mark Driscol" skrev:

Will this work for you?

ActiveChart.PlotArea.Width = ???
ActiveChart.PlotArea.Height = ???

Replace the ???s with whatever numbers you need.


Mark


Freddie Mac wrote:
I have a problem when using a macro to set size of a chart. I acnnot use the
macro recorder so I want to be able to set size in code. My code is:

Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlUserDefined, TypeName:="Standard"
.......
ActiveChart.Shapes.ChartArea.Height = 1000

As you may see the last line is faulty..I just dont know how to write it.
What I want to do is to set the size (height and width) in the code. If you
know how to solve this please help me.




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
Setting Listbox Size VBA Sandy Excel Worksheet Functions 1 April 27th 07 05:48 PM
getting size or setting it? Sonnich Excel Programming 2 June 8th 06 09:49 AM
Problem setting font size Edward Ulle Excel Programming 2 March 3rd 05 03:23 PM
Setting size of icons Rob Excel Programming 0 January 26th 05 08:33 PM
setting a chart size julio Excel Programming 1 December 18th 03 05:26 PM


All times are GMT +1. The time now is 12:28 PM.

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

About Us

"It's about Microsoft Excel"