Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
problem with a conditional max problem | Excel Discussion (Misc queries) |