Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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.


Reply
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
Colon at the end of excel file name(ex: problem.xls:1, problem.xls financeguy New Users to Excel 2 January 15th 10 01:15 AM
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
problem with a conditional max problem Brian Cornejo Excel Discussion (Misc queries) 1 February 18th 05 06:25 PM


All times are GMT +1. The time now is 11:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"