Further Userform questions

  • Thread starter Thread starter Stuart
  • Start date Start date
S

Stuart

With a textbox (from the Drawing toolbar) on a Userform
can I allow the user to select some of their text and :

1. Change the Font
2. Change the Font size
3. Underline it
4. Italicise it

Regards.
 
I'm not sure what you mean by a text box from the Drawing
toolbar. However, if you have a regular MSForms textbox on a user
form, you can change the Font property in a variety of ways,
e.g.,

Me.TextBox1.Font.Underline = True
Me.TextBox1.Font.Italic = True
Me.TextBox1.Font.Name = "Times New Roman"
Me.TextBox1.Font.Size = 16



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Apologies, that is what I meant.
For further clarity..........can the user make these changes after the form
is displayed?

Or can/must I use an ActiveX control?

Regards and thanks
 
If you provide some control for notification.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Just use the Textbox control from the Toolbox in the VBA editor.
The user can't change the properties of the text box directly.
You would have to provide command buttons that would make the
requested changes via code similar to what I posted earlier.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Nope, I cannot make this work.
Provide a Control to change all the text in some way seems ok, but letting
user select/highlight some of the text and alter their selection....that I
cannot see.

Regards.
 
Highlighting it would be tricky, you would need to have an array of controls
for different textboxes, maybe dropdowns for fonts, sizes, etc. Could get
quite complex.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I'm pretty sure you can not apply formating to sections of the text in a
textbox control. It's all or nothing.

Cheers
Andy
 
Hi

The Microsoft controls that allow formatting on selected text only are the
RichTextbox control (using rtf) and the DHTMLEdit control (using html).

HTH. Best wishes Harald
 

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

Back
Top