Chart VB Code Syntax

  • Thread starter Thread starter Tim Childs
  • Start date Start date
T

Tim Childs

Hi

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

comes from a John Walkenbach post 8 years ago:
http://groups.google.com/group/microsoft.public.excel.misc/browse_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
 
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)
 
Hi

that is very helpful - thanks

Tim

I like the signature line re: email!
 
Tim Childs said:
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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top