PC Review


Reply
Thread Tools Rate Thread

Chart VB Code Syntax

 
 
Tim Childs
Guest
Posts: n/a
 
      2nd Feb 2008
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


 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      2nd Feb 2008
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Tim Childs
Guest
Posts: n/a
 
      2nd Feb 2008
Hi

that is very helpful - thanks

Tim

I like the signature line re: email!

"Bob Phillips" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      3rd Feb 2008

"Tim Childs" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> that is very helpful - thanks
>
> Tim
>
> I like the signature line re: email!


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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
wrong syntax when I try to set Javascript code in C# Code Behind. mesut Microsoft C# .NET 5 30th Jul 2008 10:22 AM
Chart syntax =?Utf-8?B?QXJuZSBIZWdlZm9ycw==?= Microsoft Excel Programming 4 29th Aug 2006 02:12 PM
chart series syntax =?Utf-8?B?S2hvc2hyYXZhbg==?= Microsoft Excel Setup 0 25th Jun 2006 11:33 AM
Syntax for changing chart in report =?Utf-8?B?a29oYWk=?= Microsoft Access VBA Modules 1 15th Nov 2005 06:20 PM
Chart of C# to VB.NET equivelent syntax Earl Teigrob Microsoft C# .NET 5 7th Jul 2004 02:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:44 PM.