Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John Walkenbach has a superscript/subscript addin that provides a userform to
ask the user how to format the cell's characters. The code is protected, but the same (similar) function is included in his Power Utility Pak utilities. And for a small fee, you can get the source code. Even if you decide not to use John's code, you may want to look at what he did for ideas: http://j-walk.com/ss/excel/files/supersub.htm ====== I don't know of a way to tell what the user hightlighted while they were editting the cell. If you had a list of words that you knew would be highlighted, you could use a macro to _always_ change them. Here's a link to a post that bolded certain words. You could modify it to change the color, too. http://groups.google.com/groups?thre...DF4B%40msn.com David wrote: Thanks. Is there any way to determine what portion of the text in a cell has been selected by a user? I guess my earlier example was a vague. The spread sheet will have cells containing text. Some portion of that text (a word, a phrase, etc.) will be highlighted by the user and will need to have the font weight and color changed to "highlight" it within the cell. The portion of text could be anywhere in the cell. Thanks again for your advice. David -----Original Message----- David You can't run code while in Edit mode. This precludes the option of double-clicking, selecting the word and hitting a button. You will have to use Bob's code to do what you want by pinpointing the exact area in the string. Gord Dibben Excel MVP On Wed, 21 Apr 2004 14:55:59 -0700, "David" wrote: Is it possible to write a macro to changed the properties of a portion of the text within a cell? For example I have the following in a cell: "The word STOP should be red" Now I want make the word STOP bold, underlined and red. I understand that I can double-click the cell, select the word and then press the bold, underline and text color buttons to make the change. I would like to select the word and press a single custom button to make that change. Is that possible? Thanks. David . -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why does editing a formula cause cell to reformat to text? | Excel Discussion (Misc queries) | |||
Editing Text | Excel Discussion (Misc queries) | |||
Editing Repeated Text | Excel Worksheet Functions | |||
text editing function help | Excel Worksheet Functions | |||
Why does the cell I'm editing put the text on the right side? | Excel Discussion (Misc queries) |