Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Chart VB Code Syntax

Hi

This helpful code snippet:
MsgBox ActiveChart.Parent.TopLeftCell.Address

comes from a John Walkenbach post 8 years ago:
http://groups.google.com/group/micro...wse_thread/thr
ead/ff952bea085dfdaa/e76f6ed598be6b4f?hl=en&lnk=st&q=chart+topleftcell# e76f6
ed598be6b4f

It was very helpful. However can someone tell me why the Parent is needed -
intuitively, I'd have thought the the top left cell was a property of the
active chart itself, not its parent, but obviously not..?

Thanks

Tim


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Chart VB Code Syntax

Because the chart is contained within a chartobject which is what lays on
the worksheet, so you need the chart's parent to see where abouts in the
sheet it is positioned.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Tim Childs" wrote in message
...
Hi

This helpful code snippet:
MsgBox ActiveChart.Parent.TopLeftCell.Address

comes from a John Walkenbach post 8 years ago:
http://groups.google.com/group/micro...wse_thread/thr
ead/ff952bea085dfdaa/e76f6ed598be6b4f?hl=en&lnk=st&q=chart+topleftcell# e76f6
ed598be6b4f

It was very helpful. However can someone tell me why the Parent is
needed -
intuitively, I'd have thought the the top left cell was a property of the
active chart itself, not its parent, but obviously not..?

Thanks

Tim




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Chart VB Code Syntax

Hi

that is very helpful - thanks

Tim

I like the signature line email!

"Bob Phillips" wrote in message
...
Because the chart is contained within a chartobject which is what lays on
the worksheet, so you need the chart's parent to see where abouts in the
sheet it is positioned.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my

addy)



"Tim Childs" wrote in message
...
Hi

This helpful code snippet:
MsgBox ActiveChart.Parent.TopLeftCell.Address

comes from a John Walkenbach post 8 years ago:

http://groups.google.com/group/micro...wse_thread/thr

ead/ff952bea085dfdaa/e76f6ed598be6b4f?hl=en&lnk=st&q=chart+topleftcell# e76f6
ed598be6b4f

It was very helpful. However can someone tell me why the Parent is
needed -
intuitively, I'd have thought the the top left cell was a property of

the
active chart itself, not its parent, but obviously not..?

Thanks

Tim






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Chart VB Code Syntax


"Tim Childs" wrote in message
...
Hi

that is very helpful - thanks

Tim

I like the signature line email!


Yeah, we have to go to such lengths to avoid the sniffers getting our email
addies (still get hundreds every week though).


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
please help with syntax in code tracks via OfficeKB.com Excel Programming 17 November 7th 06 08:21 PM
Help with Syntax in Code Ken Hudson Excel Programming 1 October 6th 06 05:22 PM
Help with Syntax in Code Tom Ogilvy Excel Programming 0 October 6th 06 04:36 PM
Syntax of VBA Code Ken Hudson Excel Programming 1 September 14th 05 10:09 PM
help with code/syntax Jay Baxter Excel Programming 0 February 26th 04 08:11 PM


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

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

About Us

"It's about Microsoft Excel"