sous2817
Well-known Member
- Joined
- Feb 22, 2008
- Messages
- 2,276
Hello everyone,
Creating a class has always escaped me in VBA, but I think I'm in a spot that it can help me, so no better time to learn...Here's what I'm trying to do:
I'm working on some userforms and rather than the standard buttons, I'm using two images overlayed to create a "mouse over" effect. So every odd number image has this code:
and every even image has code like this:
Can someone point me in the direction of (or provide me with ) some class code that could save me from some redundant typing?
Thanks in advance!
Creating a class has always escaped me in VBA, but I think I'm in a spot that it can help me, so no better time to learn...Here's what I'm trying to do:
I'm working on some userforms and rather than the standard buttons, I'm using two images overlayed to create a "mouse over" effect. So every odd number image has this code:
Code:
Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Image2.Visible = True
End Sub
and every even image has code like this:
Code:
Private Sub Image2_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Image2.SpecialEffect = fmSpecialEffectSunken
End Sub
Private Sub Image2_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Image2.SpecialEffect = fmSpecialEffectFlat
End Sub
Can someone point me in the direction of (or provide me with ) some class code that could save me from some redundant typing?
Thanks in advance!