Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Chart Size & Position
Excel 97 macro copies data blocks to a sheet and plots a graph. This
works well but the size and position is somwhat random. I would like it to appear below the data array and be about the same size. Can that be done? Charts.Add ActiveChart.ChartType = xlSurface ActiveChart.SetSourceData Source:=Sheets("Test").Range("E" & MapPasteTo + 27 & ":Q" & MapPasteTo + 39), _ PlotBy:=xlColumns ActiveChart.Location Whe=xlLocationAsObject, Name:="Test" |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Chart Size & Position
The following Methods can be used to modify the dimensions and position of a
ChartObject: Height Width Top Left -- If a post answers your question, please mark it as the answer. "Fan924" wrote: Excel 97 macro copies data blocks to a sheet and plots a graph. This works well but the size and position is somwhat random. I would like it to appear below the data array and be about the same size. Can that be done? Charts.Add ActiveChart.ChartType = xlSurface ActiveChart.SetSourceData Source:=Sheets("Test").Range("E" & MapPasteTo + 27 & ":Q" & MapPasteTo + 39), _ PlotBy:=xlColumns ActiveChart.Location Whe=xlLocationAsObject, Name:="Test" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Chart Size & Position
Sub ABC()
Dim ch As Chart Charts.Add MapPasteTo = 1 'Set r = Sheets("Test").Range("E" & _ MapPasteTo + 27 & ":Q" & MapPasteTo + 39) ActiveChart.SetSourceData _ Source:=Sheets("Test").Range("E" & _ MapPasteTo + 27 & ":Q" & MapPasteTo + 39), _ PlotBy:=xlColumns ActiveChart.ChartType = xlSurface ActiveChart.Location Whe=xlLocationAsObject, Name:="Test" Set ch = ActiveChart With Worksheets("Test").Range("E" & MapPasteTo) ch.Parent.Top = .Top ch.Parent.Left = .Left End With End Sub worked for me. -- Regards, Tom Ogilvy "Fan924" wrote: Excel 97 macro copies data blocks to a sheet and plots a graph. This works well but the size and position is somwhat random. I would like it to appear below the data array and be about the same size. Can that be done? Charts.Add ActiveChart.ChartType = xlSurface ActiveChart.SetSourceData Source:=Sheets("Test").Range("E" & MapPasteTo + 27 & ":Q" & MapPasteTo + 39), _ PlotBy:=xlColumns ActiveChart.Location Whe=xlLocationAsObject, Name:="Test" |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Chart Size & Position
Worked great Tom. Thanks. I added 40 to the line count so it appears
below the data and added width and height. Exactly what I wanted! With Worksheets("Test").Range("E" & MapPasteTo + 40) ch.Parent.Top = .Top ch.Parent.Left = .Left ch.Parent.Width = 600 ch.Parent.Height = 300 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fix size and position of comment | Excel Discussion (Misc queries) | |||
Window Position & Size | Excel Discussion (Misc queries) | |||
ho to change in the bubble chart the bubble position and size | Charts and Charting in Excel | |||
Chart size/position | Excel Programming | |||
Position/Size a MessageBow | Excel Programming |