![]() |
how to format text in textbox?
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? |
how to format text in textbox?
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. "ghost" wrote: 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? |
All times are GMT +1. The time now is 02:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com