Changing Textbox Text Font Type/Size, Bold, Italic, Underline And Color
Hi everyone, this is urgent.
I have a textbox where user can type in there. When user select (highlight) the text they can change the font, size, Bold, Italic, Underline and/or color. It should work like in MS Word.
How do I do this? I have a combo box for Fonts, a combo box for Size, and 4 command buttons for B, I, U, and Color.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- Bold, Italic And Underline Button Font
- Underline - Italic - Bold Text ?
- Bold, Italic, Underline
- Changing Font/color/bold Of Certain Text..
- How To Use Bold And Italic Text In A Textbox
- How To Make Text In A Textbox Italic, Bold Or Underlined Etc...
- Changing Font To Italic In Light Gray Color Based On Data (in MS Access Reports)
- Richtextbox Text Changing Color When Font Size Changes
- Changing Font Size & Bold
- Changing Font Size And Bold And Font ???
- RTF Color, Bold, Italic, Etc
- Font Color And Bold Text?
- Text Box, Vb6, Controling Bold Italic
- Making Text Bold Or Italic
- Changing The Font Color Of A Rich Textbox
- Changing The Font Color Of A Rich Textbox
- Changing The Font Color Of A Rich Textbox
- Changing Disable Textbox Font Color
- Formating Text With Bold, Italic, And Colors
- How To Include In An Printing Text Bold Or Italic?
- Underlining And Making The Text Bold And Italic
- Chaning Textbox Font Name, Size And Color At Run Time?
- Changing Enabled = False Textbox Font Color
- Changing Font Color Cause Text Box To Flicker
- Changing The Color Of The Font In A Rich Text Box
- Changing Font Color In Rich Text Box
- Changing The Font Size Of Text In A Cell In A PPT Table
- Changing Font Size In Text Mode Printing
- A Text Field In A Form Changing Color Of The Font?
- Changing Font Color Of Command Button Text
- TextBox-Changing Font And Style Of Partial Text
- Command Button Font Bold And Color
- Access|changing Font To Bold Via VBA Code
- DataReports: Applying Bold Or Font Size (conditional)
- Changing Color Of A Line Of Text In Textbox
- How To Make A Cell's Font BOLD & Color RED Using If Condition In MSHFlexgrid?
- Part Of Textbox In Bold Or Other Font
- Changing Color & Bold Doesn't Work!
- Retain Font Styles When Changing Font Size
- How To Change The Font Type And Font Size For A Menu Bar?
- Bold,italic, And The Rest
- How To Make Bold Text In One Textbox Bold In Another Textbox
- Combo Box For Bold,italic,regular
- Bold Or Italic Characters In A Msgbox
- Underline Text In Textbox
- Changing Back Color Or Font Color Of DTP
- How To Turn On And Off BOLD And UNDERLINE
- Bold, Underline, Italics
- Font Size And Font Color
Bold, Italic And Underline Button Font
does anyone know which font do they use for the bold, italic and underline buttons? I have tried lookin through them and trying to find them but i dont have the patience
Underline - Italic - Bold Text ?
how can i program a text in code, that it will change from a standard text into a underlined - italic - bold text ?
i know it's a stupid question ... but i'm lost it in my memory
Bold, Italic, Underline
I've had a search through the Forum, can't find what I'm after though, so...
I have a standard Toolbar on my form with Bold, Italic & Underline buttons.
Quite obviously I want to be able to select these and then text from Text1 is sent to RichTextBox1 with this formatting.
I want to make the detection of this formatting as a Public Sub though.
Public Sub FormatText() 'Do i put Data As String here or "Dim" it within the Sub ?
If Toolbar1.(reference to the BOLD button).value = tbrPressed then
RichTextBox1.SelBold '= True (not sure of this bit of code)
If Toolbar1.(reference to the ITALIC button).value = tbrPressed then
RichTextBox1.SelItalic '= True (not sure of this bit of code)
If Toolbar1.(reference to the UNDERLINE button).value = tbrPressed then
RichTextBox1.SelUnderline '= True (not sure of this bit of code)
RichTextBox1.SelText = Data & vbNewLine
A little push in the right direction is all I ask please
Changing Font/color/bold Of Certain Text..
say i have 2 buttons... each button enters text into a textbox... the same textbox... and it adds it all together so there on top of eachother...
| Button 1 text |
| Button 2 text |
now say i want to change the bold to the button 2 text... and only make that bold.. or change the color... but the button 1 text stays the same... now of course i would set this before i wrote to the textbox.. but any ideas... how i can just change the color to say one line of the textbox instead of the whole textbox...
How To Use Bold And Italic Text In A Textbox
i want my textbox to be bold when the user press ctrl+b and italic when ctrl-i like in microsoft word. is there a function for that? and yeah also the highlight function using shift key..
And one more thing.. can the bold italic used in a statement like if mystring is bold then... got my point? thanks a lot..
How To Make Text In A Textbox Italic, Bold Or Underlined Etc...
I've been working on a simple project (to me it must be simple, because i am just aan vb noob;).
In my project i am using a multiline textbox with scrollbars, but only plain text shows up; offcourse.
How can I make up my text, like centrain words unerlined or italic or bold?
Thansk in advance
Changing Font To Italic In Light Gray Color Based On Data (in MS Access Reports)
Here's a Control Source of one of the fields in a report we have:
=IIf(([Reports]![R_PER_CAT]![txtBB])=0 Or [Reports]![R_PER_CAT]![txtEE]=0, _
As you can see it changes result to "n/a" when some data is missing.
I'd like to also make it italic and in a bit of a lighter color.
Any relatively easy way to do it?
Richtextbox Text Changing Color When Font Size Changes
I have code to change the font size of the text in my Richtextbox, but when it does change the font size, it also changes the color of whatever the text currently is to black. In other words, if the text is currently red or blue, it will change the text to black.
combo1.listindex = 0
Private Sub Combo1_Click()
RichTextBox1.SelStart = 0
RichTextBox1.SelLength = Len(RichTextBox1.TextRTF)
RichTextBox1.Font.Size = Combo1.Text
Anyone have any ideas why this might be happening ?
Changing Font Size & Bold
How do I change the font size and bold property.
here is the code I am using ;
FontSize = 10
Print #1, Tab(4); cmbCustomer; Tab(45); cmbCity; ","; cmbState, vbCrLf,
Print #1, Tab(10); "Notes: "; Note.Text; vbCrLf,
Changing Font Size And Bold And Font ???
dim Heading as string
Heading = "I want to Make this sentance Bold and bigger"
how would i go about making this variable bold and changing the font and font size.
RTF Color, Bold, Italic, Etc
How does the .selbold and .selcolor controls of a ritch text box work? If i use
rtf.selbold = true
not on the selected text gets enboldened, the whole lot does!
Font Color And Bold Text?
I want to make my outlook body text "New Invoice Number".....
font colour = blue and text = bold
How can i edit the line below to make this happen?
olMail.Body = msg & vbCrLf & vbCrLf & "New Invoice Numbers : " & myvar
Text Box, Vb6, Controling Bold Italic
What I have is a text box that is called txtMsg that I can change and send the changes to a remote mysql data base. This information is then read by a php file and you see the changes on the web site. right now if I want to say change the color of the first two words to red I have to type this into my txtMsg box.
<font color="red"> Hello World</font color>.
What I would like to be able to is have a color selector and highlight the words Hello World and it place the <font color="red"> </font color> on each side of the highlited area.
hope some one has an idea or has done something like this before.
Making Text Bold Or Italic
Is it possible to change the text in a MapiMessage Bold or Italic or change the size?
MAPIMes.MsgNoteText = "I want this message to be Bold or Italic"
Tnx in advance !!
Changing The Font Color Of A Rich Textbox
how can I change the font color of a rich textbox? I've tried looking for "forecolor" option but there's none...
Edited by - gen23 on 5/6/2004 10:44:28 PM
Formating Text With Bold, Italic, And Colors
I have this program that i wrote, it is a data base that allows the collection of quotes from articles and books. The idea is that as a student, i want to have quotes and important points available at a moment's notice so as to be later able to acces these quotes to write a paper. At this point the program works fine, i need to do a little arraning of controls and work the search procedure out a little, but there is one thing i have not figured out.
I am referring to formating text with bold, italic, and colors. I have a rich text box, and i am able to save and retrieve formated text as follows, where quote is the field of the table quotes.mdb and .textRTF (not .Text) is what writes the formatted info to the database
rsRecordSet!quote = richtxtbox.TextRTF & " "
What I would like to do however, is to put a couple of command buttons on the side of the rich text box, like B for bold, I for italics, G for green, and R for red so as to format this important quote on the fly, and of course save (rsRecordSet.update) this information to my quotes table. Can someone help me out here?
How To Include In An Printing Text Bold Or Italic?
I want to print with ...
Printer.Print "This is a Text and this part have to be bold and this part italic"
... and the Result should be ...
This is a Text and this part have to be bold and this part italic
I can't separate the Line. It must come in one command to the Printer.Print
I use HP-Printers with PCL-Commandset.
Underlining And Making The Text Bold And Italic
Open "1.txt" for Output as #1
Print #1; tab(8);"Classic Visual Basic"
How to underline "Classic Visual Basic" and at the same time
making it bold ad Italic.
Classic Visual Basic
Chaning Textbox Font Name, Size And Color At Run Time?
How can i do this?
I have the options in a text box. Here is what I have been trying...
Textbox named "Inpt"
ComboBox named "FontBox"
For now, ill have one item in the box, "Times New Roman."
Here is my code...
Private Sub FontBox_Change()
Dim FontName As String
FontName = FontBox
Inpt.FontName = FontName
Private Sub Form_Load()
FontBox.AddItem "Times New Roman"
Private Sub mnuExit_Click()
Private Sub mnuNew_Click()
Inpt.Text = ""
Changing Enabled = False Textbox Font Color
i am new to visual basic.
i have set a textbox's enabled properties to false.
the text color in the textbox appear to be grayish, although i have tried to change the forecolor to black.
is there anyway i can get back the font appearing in that textbook to be in black color even after i disabled it?
Changing Font Color Cause Text Box To Flicker
If my rich text box control has more text than can currenlty be dispalyed at one time and I change the font color of all the text in the text box, the rich text box will flicker. If the total text in the rich text box does not fill up the entire rich text box dispaly area, I can change any text font color and I do not get any flicker. Is there any way to prevent this repaint event from occuring?
my code is pretty simple:
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Text1.SelColor = NormalFontColor
Changing Font Color In Rich Text Box
Hi, can u tell me how to change the font color in rich text box control..
I want few
line color to in red
and few in blue
and few in black.
how to get this.
thanks in adv.
Changing Font Size In Text Mode Printing
I'm printing from my application in text mode. That is by using API functions such as OpenPrinter, StartDocPrinter, WritePrinter etc. My problem is that I need a better way to set the font size. At the moment I'm Doing it by appending chr$(15), chr$(18) etc before the string to be printed.
I just want to know whether there is any other better options to specify the font size.
I'm using VB 6.0 and Windows 98
TextBox-Changing Font And Style Of Partial Text
Hi everyone, I have the following issue
I would like to select a determined string in a text box, and change the different properties of a text such as the font, size and style. I review the library but I couldnt find an specific solution for a partial string. I mean if i applied the following code -TextBox1.Font.Italic-, the whole text will change. However I want to change just a simple substring in Textbox1, like the MS Word editor.
Could you help me with this issue.
Thanks in advance for your support folks
Access|changing Font To Bold Via VBA Code
Hello, I am a student currently learning Microsoft Access. I have no experience with visual basic. I have a form in a access database. I would like one of the field values to be bolded if the value is greater than 500. My code looks like this:
I am using the Onload event in the form properties.
Private Sub Form_Load()
If [TotalPledged] > 500 Then
I am getting an "invalid use of property" error, but I can't figure out how to fix this If i have [TotalPledged].forecolor it works, but not fontbold...
Thanks for your help
DataReports: Applying Bold Or Font Size (conditional)
I am trying to apply bold or change the font size when the word OPTION appears in the report textbox called txtDescription. The code does not throw an error but outcome of the report is unchanged.
Any help in this matter would be appreciated!
Dim WithEvents myStdData As StdDataFormat
Dim WithEvents myDescData As StdDataFormat
Dim WithEvents myDescription As StdDataFormat
Private Sub DataReport_Initialize()
Set myStdData = New StdDataFormat
Set myDescData = New StdDataFormat
Set myDescription = New StdDataFormat
mat = myDescription
Private Sub myStdData_Format(ByVal DataValue As StdFormat.StdDataValue)
If DataValue.Value = "0" Then
DataValue = ""
Private Sub myDescData_Format(ByVal DataValue As StdFormat.StdDataValue)
If DataValue.Value = 0 Then
DataValue.Value = "True"
************* This sub is where the problem exists *************************
Private Sub myDescription_Format(ByVal DataValue As StdFormat.StdDataValue)
If InStr(1, DataValue.Value, "OPTION") Then
ld = True
or = vbRed
Changing Color Of A Line Of Text In Textbox
I have a file being loaded into a textbox and I would like to know how to change the color of certain lines of text. like the VB IDE does with the comment lines. i have an idea but I am unsure where to start. do I start after it loads into the box or before? if you need the code that loads it in the box let me know I would post it.
thanks for your help
How To Make A Cell's Font BOLD & Color RED Using If Condition In MSHFlexgrid?
How to make a cell's font to BOLD & font color to RED using if condition in MSHFlexgrid?
I want to modify the following code to get the above result:
Dim Y As Long
For Y = .FixedRows To .Rows - 1
.TextMatrix(Y, 5) = Format(.TextMatrix(Y, 5), ("###,###.00;;DELETED "))
The above code is working fine. But, now what I would like to do is to apply a if condition in the same code to get the following result:
If the cell value is "0.00" then it should fill the cell with "DELETED". Upto this level it is working fine. But I want to apply the condition that If Cell Value is equal to "DELETED" then it should change the Cell font to BOLD and color to RED. How can I do it?
Help me please.
Part Of Textbox In Bold Or Other Font
Is it possible to put a part of a text in a textbox in another font or bold or something like that??
I have some sort of search possibility in my app and it would be nice to put the found part of text in another font or so (or something else but it must draw the attention).
Is this possible with a normal textbox?
If not, any ideas? Perhaps another control or so?
I'm using VB6.
Changing Color & Bold Doesn't Work!
Iam try to alter the color and boldness of cells in Excel using VBA. The code I use is for example:
Worksheets("1").Range("W1").Font.ColorIndex = 1
Worksheets("1").Range("W1").Font.Bold = False
THis work perfectly for most cells although I have a few that won't change. Even if formatted in Excel. The cells aren't locked or protected!
Does anyone have any suggestions?
Retain Font Styles When Changing Font Size
March 25, 2008
Hello, everyone. I searched for over two hours for an answer but didn't find a relevant forum example. I am using a richtextbox for my documentation. I made several simple font features such as font sizes and font styles (bold and underline) to the richtextbox. The problem I have is that after I bolded and underlined some of my document text, if I change my document to a different font size, any text that have been bolded or underlined will be undone, so I have to highlight them and bold or underline them again. Does anyone have any advice or any example code to correct it?
The following is a fragment of code in selecting for fontbold and for changing font size:
If Len(Trim(RichTextBox1.SelText)) > 0 Then' For selecting text
RichTextBox1.SelFontSize = 14
RichTextBox1.SelBold = Not (RichTextBox1.SelBold)' For selecting text for bold
RichTextBox1.Font.Size = 14 ' Font size to the whole document or richtextbox
Any advice or help will be greatly appreciated.
How To Change The Font Type And Font Size For A Menu Bar?
I meet a problem in my application. How can i change the font type and font size for the menu used in th form? Since my application is run on 1280x1024, it is too small to see the type on the menu bar. Could anyone help me? Very urgent!!! Thanks.
Bold,italic, And The Rest
ok , you know how in MS Word, if you have certain text lets say bolded, if you go back and put the cursor within the the bolded text, the BOLD toolbar button becomes pressed to show that the text is bolded, how'd they do that??
How To Make Bold Text In One Textbox Bold In Another Textbox
I am writing a somewhat basic chat application, I was on the verge of releasing it when I spotted a bug. When I typed with bold text inside Text1, it only appeared normal inside Text2. Is there any way to have Text2 display the text formatting as well? I would also like to do this with the text colors.
Changing Back Color Or Font Color Of DTP
I have a DTP whose value is being populated from Access 2003 database. I require that if the year value is less than 1951 then it should have a backgroundcolor as vbred or atleast the font displayed should change to vbred. I tried the below code line in change & click event of DTP but to no effect. I did not use both codes together or use the codes in both the events simultaneously.
If Year(Me.dtp1.Value) <= 1950 Then Me.dtp1.CalendarForeColor = vbRedIf Year(Me.dtp1.Value) <= 1950 Then Me.dtp1.CalendarBackColor = vbred
could somebody help me.
How To Turn On And Off BOLD And UNDERLINE
I am trying to print a line with UNDERLINE and BOLD on but keep getting "Invalid use of property" error. Can someone please guide me how to turn the UNDERLINE and BOLD on and then after printing the line, how to turn them OFF so the rest of the text gets printed without the bold and underline.
Thanks a lot for all your help.
Printer.FontName = "Courier New" Printer.FontSize = 10 'Printer.Font.Underline 'Printer.Font.Bold Printer.CurrentX = 600 Printer.CurrentY = PageStart + 6 * 400 'y pos Printer.Print Strg1
Bold, Underline, Italics
Where might I find an example of how I can use the BOLD, ITALIC, and UNDERLINE, methods for text inside a text box?
Also is a text box the best way to go with using bod, italics, and underlines?