Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Identifing charts by user selection

Hi All,
I have a spread sheet with several different chart objects within it.
I would like to write a simple macro so that If I cick (select) any one of
the charts with-in the current spread sheet I am viewing and than run my
macro, a msgbox will pop up and give me the Name of the chart object and the
index number of the chart object.

Any help would be greatly appreciated
Thanks,
Dan Thompson.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Identifing charts by user selection

Hi,

Try this,

Sub x()
With ActiveChart.Parent
MsgBox .Name & " Index " & .Index
End With
End Sub

Cheers
Andy

Dan Thompson wrote:
Hi All,
I have a spread sheet with several different chart objects within it.
I would like to write a simple macro so that If I cick (select) any one of
the charts with-in the current spread sheet I am viewing and than run my
macro, a msgbox will pop up and give me the Name of the chart object and the
index number of the chart object.

Any help would be greatly appreciated
Thanks,
Dan Thompson.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Identifing charts by user selection

Thanks Andy that seemd to do the trick.

Dan Thompson.

"Andy Pope" wrote:

Hi,

Try this,

Sub x()
With ActiveChart.Parent
MsgBox .Name & " Index " & .Index
End With
End Sub

Cheers
Andy

Dan Thompson wrote:
Hi All,
I have a spread sheet with several different chart objects within it.
I would like to write a simple macro so that If I cick (select) any one of
the charts with-in the current spread sheet I am viewing and than run my
macro, a msgbox will pop up and give me the Name of the chart object and the
index number of the chart object.

Any help would be greatly appreciated
Thanks,
Dan Thompson.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

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
Identifing Weeks in a Month. GEM Excel Discussion (Misc queries) 4 July 31st 09 03:46 AM
Identifing total hours as a whole number Bob Morrison New Users to Excel 2 July 18th 07 10:08 PM
Identifing smallest numbers M Moore Excel Discussion (Misc queries) 1 August 29th 06 02:34 PM
Checking specific cell, and identifing how many rows in the sheet Amy[_9_] Excel Programming 3 April 21st 05 03:57 PM
User selection Samir[_2_] Excel Programming 3 January 7th 04 03:06 PM


All times are GMT +1. The time now is 07:47 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"