Multi-line text on a CommandButton

P

Paul Kraemer

Hi,

I am using Excel 2007. I have inserted an ActiveX Command Button on a
worksheet. I can enter descriptive text in the "Caption" field and this text
is displayed on this Command Button. I can only seem to enter one line of
text this way. Can anyone tell me if there is a way I can enter a second
line of text to be displayed on the Command Button?

Thanks in advance,
Paul Kraemer
 
D

Dave Peterson

If you rightclick on the commandbutton (while in design mode), you can choose:

Commandbutton Object|Edit
And type the caption you want. Use ctrl-enter to force a newline in that
caption.
 
D

Dave Peterson

And if you wanted to do it in code:

Worksheets("Sheet1").CommandButton1.Caption = "hi" & vbLf & "there"
 

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