Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Martin,
Use the TypeOf operator. E.g., If TypeOf Selection Is Excel.ChartArea Then Debug.Print "Chart selected" End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Martin Stender" wrote in message oups.com... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
dialog box selection type | Excel Discussion (Misc queries) | |||
type of selection if selection is chart | Excel Programming | |||
Object Type of a selection... counting rows in a selection | Excel Programming | |||
Understanding Selection "Type" | Excel Programming | |||
How to find what object type is returned from Selection property ? | Excel Programming |