Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Firstly, colorindex values are type 'Long' and so your code would print
"Long" in the debug window regardless of the character's color. Secondly, the first line of code that fails is where you try to put the Character.Count value into 'j'. Try this revised code. (I renamed it with the correct spelling of the word "Character", and so it shouldn't raise an alert when you run it) Sub ColourAndReportCharacter() Dim i As Integer For i = 1 To Len(ActiveCell.Text) Debug.Print ActiveCell.Characters(i).Font.ColorIndex Next i End Sub So how, exactly, do you want to store the ColorIndex values? I suggest you play around with colors and see the output in the Immediate Window. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stepping through each character in a character string | Excel Programming | |||
find a character in a string | Excel Discussion (Misc queries) | |||
Excel-Match 1st text character in a string to a known character? | Excel Worksheet Functions | |||
Wild Character in String | Excel Programming | |||
Function to return Character Position of Xth character within a string | Excel Programming |