LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Mark Stephens
 
Posts: n/a
Default ActiveChart.Deselect won't Deselect

The code below works beautifully except for the Deselection of the chart
which steadfastly refuses to work. I even added

ActiveChart.ChartArea.Select

as an intermediate step to encourage it and two more chances before it
exits! What can be the problem here? The code is obviously executing but for
some reason does not see itself as active as soon as the event is triggered.

ANhyone know why it won't Deselect?

Thanks for your help, Mark


Private Sub Chart_MouseDown(ByVal Button As Long, ByVal Shift As Long, ByVal
x As Long, ByVal y As Long)

Dim ElementID As Long, Arg1 As Long, Arg2 As Long


With ActiveChart

' Pass x & y, return ElementID and Args
..GetChartElement x, y, ElementID, Arg1, Arg2

' Did we click on a point?
If ElementID = xlSeries Then

'Is it already Exploded?
If ActiveChart.SeriesCollection(1).Points(Arg2).Explo sion 0
Then
ActiveChart.SeriesCollection(1).Points(Arg2).Explo sion = 0
ActiveChart.ChartArea.Select
ActiveChart.Deselect
Else
ActiveChart.SeriesCollection(1).Points(Arg2).Explo sion = 20
ActiveChart.ChartArea.Select
ActiveChart.Deselect
End If

End If

ActiveChart.ChartArea.Select
ActiveChart.Deselect

End With

ActiveChart.ChartArea.Select
ActiveChart.Deselect


End Sub


 
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
Deselect one of many non-adjacent rows selected Nicolle K. Excel Discussion (Misc queries) 1 January 11th 05 06:24 PM


All times are GMT +1. The time now is 02:41 PM.

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"