Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting Listbox Size VBA | Excel Worksheet Functions | |||
getting size or setting it? | Excel Programming | |||
Problem setting font size | Excel Programming | |||
Setting size of icons | Excel Programming | |||
setting a chart size | Excel Programming |