Setting size

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Will this work for you?

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

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


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

"Mark Driscol" skrev:
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Applying custom chart type 1
Charts 1
Multiple Active Worksheets 3
CreateEventProc causes crash 5
Change source data to all sheets 1
Xlusrgal 4
Macro to create chart 2
Calling ApplyCustomType for Excel 2002 in C# 2

Back
Top