Hi
I am adding label to my excel sheet using OLEObjects.Add as seen below.
This works fine.
Dim v_ole As OLEObject 'z
Dim v_label As MSForms.Label 'x
Set v_ole = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Label.1", Link:=False, _
DisplayAsIcon:=False, Left:=370, Top:=45, Width:=46, Height:=18)
Set v_label = v_ole.Object
With v_label
.Font.Name = "Arial Narrow"
.Font.Size = 11
.Font.Bold = True
.Font.Underline = True
.TextAlign = fmTextAlignRight
End With
With v_ole
.Object.Caption = "Remove"
.Object.ForeColor = &H80000002
' .Object.OnAction = "RemoveClicked"
End With
Set v_ole = Nothing
Set v_label = Nothing
How do I write the code that will fire when user clicks these labels?
tia
Ajay
Bookmarks