Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got a form with a text box called Notes. The notes get added to
a spreadsheet to update a NOTES cell for a given report number. I want to have the color of the text that gets added to the spreadsheet be red, but I can't figure out how to do this. It's not the whole Notes cell that I want to change the color, but rather just the text that is entered via the Notes text box. I have a few forms where different people enter Notes into the same cell, and the notes get concatenated. Having these notes color coded will help identify where they came from. Thanks for any help. Frank |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub CommandButton2_Click()
With Range("Notes") With .Characters(Len(.Text) + 1, _ Len(Me.Controls("Notes").Text)) .Text = Me.Controls("Notes").Text .Font.ColorIndex = 3 End With End With End Sub Worked for me. -- Regards, Tom Ogilvy "Phrank" wrote: I've got a form with a text box called Notes. The notes get added to a spreadsheet to update a NOTES cell for a given report number. I want to have the color of the text that gets added to the spreadsheet be red, but I can't figure out how to do this. It's not the whole Notes cell that I want to change the color, but rather just the text that is entered via the Notes text box. I have a few forms where different people enter Notes into the same cell, and the notes get concatenated. Having these notes color coded will help identify where they came from. Thanks for any help. Frank |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
I tried this a couple different ways, and I kept getting errors. Where you have Range("Notes"), are you referring to the actual cell where the notes are entered, or are you referring to the textbox in which the note is entered? I have the notes cell identified as 'myNotesRange', and the notes textbox is called textNotes. I appreciate your help (and you have helped me out a lot in the past too!). Frank On Sat, 8 Sep 2007 19:32:01 -0700, Tom Ogilvy wrote: Private Sub CommandButton2_Click() With Range("Notes") With .Characters(Len(.Text) + 1, _ Len(Me.Controls("Notes").Text)) .Text = Me.Controls("Notes").Text .Font.ColorIndex = 3 End With End With End Sub Worked for me. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got a form with a text box called Notes. The notes get added to
a spreadsheet to update a NOTES cell for a given report number That says to me the Notes cell is named "Notes" (insert=Name =Define, Name: Notes, Refers to: =Sheet1!$B$9 as an example. -- Regards, Tom Ogilvy "Phrank" wrote: Hi Tom, I tried this a couple different ways, and I kept getting errors. Where you have Range("Notes"), are you referring to the actual cell where the notes are entered, or are you referring to the textbox in which the note is entered? I have the notes cell identified as 'myNotesRange', and the notes textbox is called textNotes. I appreciate your help (and you have helped me out a lot in the past too!). Frank On Sat, 8 Sep 2007 19:32:01 -0700, Tom Ogilvy wrote: Private Sub CommandButton2_Click() With Range("Notes") With .Characters(Len(.Text) + 1, _ Len(Me.Controls("Notes").Text)) .Text = Me.Controls("Notes").Text .Font.ColorIndex = 3 End With End With End Sub Worked for me. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change colour of font in a textbox? | Excel Discussion (Misc queries) | |||
Change font and size of a textbox | Excel Programming | |||
Userform-Change textbox color and font based on input in other tex | Excel Programming | |||
Changing font color of textbox text..... | Excel Programming | |||
Browse Forms Controls and change TextBox color based on cell color | Excel Programming |