Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default 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.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to change position of chart labels on line chart Shane Henderson[_2_] Charts and Charting in Excel 1 May 27th 11 09:31 AM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
Changing chart title changes position of chart Bing Excel Programming 3 March 9th 05 08:11 AM
Newbie VBA: How to test second position in a cell? ZoomZoom[_5_] Excel Programming 1 June 3rd 04 03:58 PM


All times are GMT +1. The time now is 02:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"