Thread: Selection type
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Vic Eldridge[_3_] Vic Eldridge[_3_] is offline
external usenet poster
 
Posts: 112
Default Selection type

Hi Martin,

The following macro should give you some more ideas.
It is worth noting that with regards to charts, clicking on a commandbutton
to run such code can change which part of the chart is selected.


Regards,
Vic Eldridge


Sub WhatIsSelected()

MsgBox "TypeName = " & TypeName(Selection)

If TypeName(Selection) = "DrawingObjects" Then
Dim DrwObj As Object
For Each DrwObj In Selection
MsgBox TypeName(DrwObj)
Next
End If

End Sub




"Martin Stender" wrote:

Hi all,

I have done a lot of VBA programming in PowerPoint, but I'm new to
Excel.

Now, want to manipulate charts, but I cannot figure out how to detect
if on or more charts on the active sheet are selected or not.

How do you discern between 'selection types' in Excel?

Thanks in advance! :-)

Martin