LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Editing text within a cell

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does editing a formula cause cell to reformat to text? Jack Greb Excel Discussion (Misc queries) 2 January 25th 08 01:56 AM
Editing Text Help Excel Discussion (Misc queries) 4 October 22nd 07 07:24 PM
Editing Repeated Text Jonny Excel Worksheet Functions 2 November 3rd 05 11:52 AM
text editing function help JenBasch Excel Worksheet Functions 3 September 19th 05 07:41 PM
Why does the cell I'm editing put the text on the right side? Kate Mars Excel Discussion (Misc queries) 1 September 10th 05 12:18 AM


All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"