Solved

Help w/ UserControl and RaiseEvent

Posted on 2006-06-21
3
212 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

759 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

22 Experts available now in Live!

Get 1:1 Help Now