how to format text in textbox?

G

ghost

Greeting,

I have the following code for showing text in textbox as follows:

On Error GoTo 10
TextBox1.SetFocus
10
If TextBox1 <> "" And TextBox2 <> "" Then
TextBox1 = TextBox1 & "" & Chr(10) & "" & Now & " :" & Chr(10) & "" &
Trim(TextBox2)
ElseIf TextBox1 = "" And TextBox2 <> "" Then
TextBox1 = Now & " :" & Chr(10) & "" & Trim(TextBox2)
End If
TextBox2 = ""
TextBox2.SetFocus

What I need is to format the “Now†to be bold and under line, how can I do
that?
 
P

Prashant Runwal

Formatting is applied to entire text box and hence this is not possible using
a single text box. Alternatuvely you can create 3 text boxes where one will
store textbox1, other will store now and third will store textbox2. For all
these 3 textboxes, do not use borders so that three will look like one. For
middle text box you can set property as bold and underline.
 

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