Group a label, textbox and command button?

M

mscertified

I have a set of 4 labels textboxes and buttons. When a button is pressed, I
want to display a msgbox with the label of the textbox in the title. Is there
any way to associate the button with the label?
 
M

Mark A. Sam

Yes, like this:

Private Sub Command127_Click()
MsgBox "Hello World", , [Label9].Caption
End Sub
 
Top