Hi all Master VBAs,
I found a webpage a few days ago but I couldn't find it now even going through my web browser history.
The webpage has a code that can update the control name as you click each control.
For example here I have three label controls in a UserForm and would like to update the name as I click each of the label. So the code would be, although not correct but, something along the lines...
Label 1 click
Private label1_click()
Call updatelabel(xx)
End Sub
Label 2 click
Private label2_click()
Call updatelabel(xx)
End Sub
Each of the control click calls for the same sub but only requires to pass certain information and "i" is determine by the control number...
Sub updatelabel(xxxx)
Me.Label(i).Name = "Happy " & i
End Sub
Bookmarks