Manipulating text - 2 queries

H

Hotbird

Tha characters property is very useful for selective formatting
multiple-line text in cells, but so far I have not been able to use it eithr
within shapes (e.g rectangle), or user forms. Is this a limitation of
Excel, or have I just not tried hard enough?

Below is a sample of the code I have successfully implemented in a large
cell.

With Worksheets("ER").Range("C2")
.Characters(149 + I, 7).Font.ColorIndex = 1 ' BLACK
.Characters(149 + I, 7).Font.Bold = True
.Characters(168 + I, 6).Font.ColorIndex = 1 ' BLACK
.Characters(168 + I, 6).Font.Bold = True
.Characters(186 + I, 4).Font.ColorIndex = 1 ' BLACK
.Characters(186 + I, 4).Font.Bold = True
.Characters(199 + I, 7).Font.ColorIndex = 1 ' BLACK
.Characters(199 + I, 7).Font.Bold = True
.Characters(227 + I, 5).Font.ColorIndex = 3 ' RED
.Characters(227 + I, 5).Font.Bold = True
.Characters(251 + I, 5).Font.ColorIndex = 1 ' BLACK
.Characters(251 + I, 5).Font.Bold = True
.Characters(271 + I, 3).Font.ColorIndex = 1 ' BLACK
.Characters(271 + I, 3).Font.Bold = True
.Characters(289 + I, 5).Font.ColorIndex = 1 ' BLACK
.Characters(289 + I, 5).Font.Bold = True
.Characters(313 + I, 4).Font.ColorIndex = 5 ' BLUE
.Characters(313 + I, 4).Font.Bold = True
End With

Second query.

Can Excel achieve visual effects, e.g.smoothly scrolling a 4 line window
through a long text string which fills say 20 lines, or mixing between 2
different pages?
 
R

Rob van Gelder

1) ActiveSheet.Shapes(1).TextFrame.Characters(Start:=1,
Length:=3).Font.ColorIndex = 3

2) I'm certain it's possible, but it would probably have quirks. I suggest
looking into an IE imbedded object and use some HTML whizz.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top