Embedding Command Buttons in a Text box or List box

  • Thread starter Thread starter Lester Lee
  • Start date Start date
L

Lester Lee

Hello,

Is there away to embed a command button in a textbox or list box? The
textbox or listbox acts as a message, and then the command button hides
the message once you click it. Is there another way to do this?

Thanks

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Lester,

You could assign a macro to a text box - from the drawing toolbar - and
assign this macro to it. Put the macro in a general module and assign it by
right-clicking, as you would with a button from the Forms bar. The textbox
basically acts like a big button when you click it and the macro makes it
disappear. If you need it to be visible again, you'll need to code for
that. Change the textbox name to suit:

Sub disappearing_box
ActiveSheet.Shapes("MyTextBox").Visible = false
End Sub

hth,

Doug Glancy
 
Back
Top