Problem with EventClass

  • Thread starter Thread starter Joey
  • Start date Start date
J

Joey

Hey,

Since I went to XP my ClassModule isn't working correctly.
The goal is when you click on a chart you are going back to the
datasheet.
In Windows 98 it was working fine, but now I must click twice before
he does the action.
It seems like he has problems with the ActiveChart.Deselect command,
but without it it does not work.

I have something like this in a module:
Public Sub InitializeChart()
Set myClassModule.myChartClass = ActiveSheet
End Sub

In the EventClassModule there is:
Private Sub MyChartClass_Select(ByVal Button As Long, ...)
...
Sheets("Start").Select
End Sub

I'm going to a chart with a button:
Private Sub CommandButton4_Mousedown(ByVal Button As Integer)
Sheets("Chart15").Select
ActiveChart.Deselect
InitializeChart
End Sub

Thanks.
Joey.
 
Hi Joey,

Does your CommandButton reside on a Worksheet? If so, try setting its
TakeFocusOnClick property to False.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 
Back
Top