Suppose a graphic obect on a worksheet is selected (A) by VBA or (II) by the user who, say, gets tossed by a Chart event. See code below.
Question is: How to cleanly deselect or unselect or selectnotwantnot the item (don't want selection handles no more) through VBA.
'Example (A) of code that does a select
'Example (II) of code that traps a select
Question is: How to cleanly deselect or unselect or selectnotwantnot the item (don't want selection handles no more) through VBA.
- DO NOT want to select some arbitrary cell A1 or other address.
DO NOT want to select some other off page or hidden object.
DO NOT NOT want to issue Sendkeys {ESC}, False.
DO NOT NOT not want to issue Sendkeys {ESC}, True.
'Example (A) of code that does a select
Code:
Sub selchart()
ActiveSheet.ChartObjects(1).Select
End Sub
Code:
Private Sub myChartClass_Select(ByVal ElementID As Long, ByVal Arg1 As Long, ByVal Arg2 As Long)
Select Case ElementID
Case xlChartTitle: MsgBox "Futz do not the chart title with."
End Select
End Sub