![]() |
Problem with EventClass
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. |
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. |
All times are GMT +1. The time now is 02:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com