Chart position newbie question
What syntax do I need to position the active chart in a certain position on
a worksheet? I'm doing this from MS Access, here's a code snippet: With objXL.ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "My Title" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Week No" .Axes(xlValue, xlPrimary).HasTitle = False End with This all works nicely but I want to put the chart at certain coordinates on the sheet. Any clues? Many thanks. Keith. |
Chart position newbie question
The Top property can be set to a certain row and the Left property can be
set to a certain column. With objXL.ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "My Title" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Week No" .Axes(xlValue, xlPrimary).HasTitle = False .Left = .Columns("B").Left 'left edge of col B .Top= .Rows(2).Top 'top of row 2 End with Mike F "Keith Wilby" wrote in message ... What syntax do I need to position the active chart in a certain position on a worksheet? I'm doing this from MS Access, here's a code snippet: With objXL.ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "My Title" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Week No" .Axes(xlValue, xlPrimary).HasTitle = False End with This all works nicely but I want to put the chart at certain coordinates on the sheet. Any clues? Many thanks. Keith. |
Chart position newbie question
"Mike Fogleman" wrote in message
m... The Top property can be set to a certain row and the Left property can be set to a certain column. With objXL.ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "My Title" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Week No" .Axes(xlValue, xlPrimary).HasTitle = False .Left = .Columns("B").Left 'left edge of col B .Top= .Rows(2).Top 'top of row 2 End with Cheers Mike, just the job. Keith. |
Chart position newbie question
Except you need to position the chart object:
With objXL.ActiveChart With .Parent .Left = .Columns("B").Left 'left edge of col B .Top= .Rows(2).Top 'top of row 2 End With End with - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Mike Fogleman" wrote in message m... The Top property can be set to a certain row and the Left property can be set to a certain column. With objXL.ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "My Title" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Week No" .Axes(xlValue, xlPrimary).HasTitle = False .Left = .Columns("B").Left 'left edge of col B .Top= .Rows(2).Top 'top of row 2 End with Mike F "Keith Wilby" wrote in message ... What syntax do I need to position the active chart in a certain position on a worksheet? I'm doing this from MS Access, here's a code snippet: With objXL.ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "My Title" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Week No" .Axes(xlValue, xlPrimary).HasTitle = False End with This all works nicely but I want to put the chart at certain coordinates on the sheet. Any clues? Many thanks. Keith. |
All times are GMT +1. The time now is 09:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com