Solved

Help w/ UserControl and RaiseEvent

Posted on 2006-06-21
3
215 Views
Last Modified: 2010-04-30
Can somebody please tell me why the dblclick event is not working.

Public Enum ButtonColor
    btnRED
    btnGREEN
    btnYELLOW
End Enum

Event DblClick()

Public Property Let Color(ByVal Color As ButtonColor)
   
    Select Case Color
        Case ledGREEN
            Green.Visible = True
            Red.Visible = False
            Yellow.Visible = False
       
        Case ledRED
            Green.Visible = False
            Red.Visible = True
            Yellow.Visible = False
       
        Case ledYELLOW
            Green.Visible = False
            Red.Visible = False
            Yellow.Visible = True
    End Select

End Property

Public Sub UserControl_DblClick()
   
    RaiseEvent DblClick

End Sub

Public Sub UserControl_Resize()

    UserControl.Width = 240
    UserControl.Height = 240

End Sub

0
Comment
Question by:pat_cunningham
3 Comments
 
LVL 11

Expert Comment

by:leclairm
ID: 16953100
Are you declaring the object with events???

dim withevents yourobject as classwithcustomevent

0
 

Author Comment

by:pat_cunningham
ID: 16953144
I just figured it out.  I had images that covered the entire usercontrol and the dblclick event that was being call was the images'.
0
 
LVL 13

Accepted Solution

by:
Mark_FreeSoftware earned 250 total points
ID: 16954605

you can ask for a refund,
see this help topic for more info:

http://www.experts-exchange.com/help.jsp#hi70
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 76
VBA/SQL - Connect to SQL server and pull data 4 88
Run code from text file in vb 1 56
MS Access 03, TransferText, decimal places 8 37
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now