Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
Control charts through VBA
Hi,
First of all; thanks for all the help I have got from this group already. I'm still experimenting with controlling charts through VBA. I'm trying to controll the sizing of the chart object and elements of the chart and to apply formatting based on user-defined charts in xlusrgal.xls. This is what I've got so far: Sub Diagram1() If Not ActiveChart Is Nothing Then ActiveChart.ApplyCustomType ChartType:=xlUserDefined, TypeName:= _ "Linje1" ActiveWorkbook.Colors = Workbooks("XLUSRGAL.XLS").Colors With ActiveChart.Parent .Height = 252.75 .Width = 342.75 End With With ActiveChart.PlotArea .Height = 204 .Width = 340 .Top = 20 End With With ActiveChart.Legend .Left = 0 .Top = 250 End With Else MsgBox "Du må merke et diagram før du utfører denne handlingen.", _ vbExclamation, "Ingen diagram merket" End If End Sub I must admit that I don't understand all of the syntax and I guess that there are better ways to accomplish this? -- Fredrik E. Nilsen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Control Charts | Charts and Charting in Excel | |||
Scroll bars without control tabs | Excel Worksheet Functions | |||
Control Charts | Charts and Charting in Excel | |||
control charts | Charts and Charting in Excel | |||
Excel Charts Linked to Spreadsheets | Charts and Charting in Excel |