Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am making a macro that generates charts and text that are to be placed on a
new worksheet. I want to be able to write code so that the charts are placed in a certain way on the new worksheet. I do not know how to write this and it wont be possible to record a macro for this because I want to be able to write it in the code so that I can change position easiliy. My code now is: Charts.Add ActiveChart.ApplyCustomType ChartType:=xlUserDefined, TypeName:="Standard" 'ActiveChart.ChartType = xlColumnClustered ActiveChart.SetSourceData Source:=Sheets(s).Range(rng2.Offset(i, 0).Address & ":" & rng2.Offset(j, 0).Address & "," & rng3.Offset(i, 0).Address & ":" & rng3.Offset(j, 0).Address), PlotBy:=xlColumns ActiveChart.SeriesCollection(1).XValues = Sheets(s).Range(rng1.Offset(i, 0).Address, rng1.Offset(j, 0).Address) ActiveChart.Location Whe=xlLocationAsObject, Name:=x With ActiveChart .HasTitle = True .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).HasTitle = True End With I dont know where and how to write the code for the placement in the worksheet. Please help me! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cursor Placement | New Users to Excel | |||
Name Placement | Excel Discussion (Misc queries) | |||
Tab placement | Excel Discussion (Misc queries) | |||
Placement question | Excel Programming | |||
Bar placement | Excel Programming |