Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default how to find if multiple chart objects are selected?

hi
how do i find if multiple chart objects are selected by the user using
the ctrl + click mechanism?
chiman

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 336
Default how to find if multiple chart objects are selected?

TypeName(Selection) returns "DrawingObjects" if more than one chart is
selected.


"Chimanrao" wrote:

hi
how do i find if multiple chart objects are selected by the user using
the ctrl + click mechanism?
chiman


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default how to find if multiple chart objects are selected?

Sub test()
Dim ob As Object, s As String

If TypeName(Selection) = "DrawingObjects" Then
For Each ob In Selection
If TypeName(ob) = "ChartObject" Then
cnt = cnt + 1
End If
Next
s = cnt & " / " & Selection.Count & _
" selected objects are ChartObjects"
Else
s = TypeName(Selection)
End If

MsgBox s

End Sub

Strangely, when I first tested in Excel 97 if multiple chartobjects and only
chartobjects were selected TypeName(Selection) returned "ChartObject". But
later in testing it returned "DrawingObjects" same as later versions. Odd!

Regards,
Peter T

"Chimanrao" wrote in message
oups.com...
hi
how do i find if multiple chart objects are selected by the user using
the ctrl + click mechanism?
chiman



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
Hide Selected Objects Clara Excel Worksheet Functions 4 June 28th 09 06:00 AM
formula 2 display selected objects ONLY in new sheet from another Andrew Langner Excel Worksheet Functions 1 February 5th 09 01:31 AM
how to find if multiple chart objects are selected? Chimanrao Excel Programming 2 March 23rd 06 02:07 PM
Deleting shapes/objects from a selected area Tim Excel Programming 1 October 23rd 04 01:00 AM
Deselect two objects after all selected Cutter[_14_] Excel Programming 3 August 8th 04 02:53 AM


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