Group a label, textbox and command button?

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top