D
David
Hello
I have started getting into (semi-)OOP with VBA and I like how easy it makes
my life.
One thing that still seems to be a long-handed way of doing things is when I
have several (for example) labels on the same page that act in the same way
Currently I would do this:
Private Sub Label1_Click()
Me.Font.Bold = True
End Sub
Private Sub Label2_Click()
Me.Font.Bold = True
End Sub
Private Sub Label3_Click()
Me.Font.Bold = True
End Sub
.......
Private Sub Label23_Click()
Me.Font.Bold = True
End Sub
Every label is this small userform does the same thing is there a shorter
way of writing this or do I have to do it one at a time?
thanks
David
I have started getting into (semi-)OOP with VBA and I like how easy it makes
my life.
One thing that still seems to be a long-handed way of doing things is when I
have several (for example) labels on the same page that act in the same way
Currently I would do this:
Private Sub Label1_Click()
Me.Font.Bold = True
End Sub
Private Sub Label2_Click()
Me.Font.Bold = True
End Sub
Private Sub Label3_Click()
Me.Font.Bold = True
End Sub
.......
Private Sub Label23_Click()
Me.Font.Bold = True
End Sub
Every label is this small userform does the same thing is there a shorter
way of writing this or do I have to do it one at a time?
thanks
David