Starkey
Board Regular
- Joined
- May 5, 2006
- Messages
- 187
Hey guys,
Hopefully this will make sense
I've created a form. It has 35 labels. Each label is numbered (1 to 35)
I want to know whether there is a shorthand way of a user clicking a label and for the cell in a worksheet to be populated by the number in that label.
The only way I know how is to create separate code for each label, along the lines of:
Private Sub Label25_Click()
Sheets("Tools").Range("B11") = 25
End Sub
Private Sub Label26_Click()
Sheets("Tools").Range("B11") = 26
End Sub
Is there a shortened way of doing this?
Thanks as ever
Mark
Hopefully this will make sense
I've created a form. It has 35 labels. Each label is numbered (1 to 35)
I want to know whether there is a shorthand way of a user clicking a label and for the cell in a worksheet to be populated by the number in that label.
The only way I know how is to create separate code for each label, along the lines of:
Private Sub Label25_Click()
Sheets("Tools").Range("B11") = 25
End Sub
Private Sub Label26_Click()
Sheets("Tools").Range("B11") = 26
End Sub
Is there a shortened way of doing this?
Thanks as ever
Mark