View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default Problem with EventClass

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]


Joey wrote:
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.