Hi folks,
needing some help from the vba pros 
I have created a userform.
I have put a lot of labels on it. I would like to run a macro when each label is clicked.
I have put the macro names in a worksheet called "Macros" in excel.
Column A (LabelName) | Column B (Macro To Call)
Label1============== Macro_That
Label2 ==============Macro_This
Label3 ==============Macro_Data
......
and more
I started with a label class so this is from here:
http://www.vbaexpress.com/forum/show...lated-userform
Option Explicit
'mikerickson, http://www.vbaexpress.com/forum/showthread.php?t=36832
Public WithEvents AnyLabel As MSForms.Label
Private Sub AnyLabel_Click()
Dim i As Integer
Dim oLabel As Control
Dim ows As Worksheet
Set ows = Worksheets("Macro")
For i = 2 To 20
If oLabel.Name = ows.Cells(i, A).Value Then
Application.Run ows.Cells(i, B).Value
End If
Next i
'With AnyLabel
'MsgBox "You clicked on " & .Parent.Name & "." & .Name
'End With
End Sub
I have become stuck now as Im not sure - how to initilaise this, its not working.
I also need to put something in the userform initialise?
I wont post my more of my feeble attempt as it may confuse more than help
sub userform_initialise()
Dim aLabel As clsAnyLabel
Dim oneControl As Object
For Each oneControl In Me.Controls
If TypeName(oneControl) = "Label" Then
Set aLabel = New clsAnyLabel
Set aLabel.AnyLabel = oneControl
.......?
end sub
if any one can assist me i would be really grateful, as ive been around many places to fix this and i better ask the experts on these experienced matters
thank you very much for your kind help
dj