View Single Post
  #25   Report Post  
Posted to microsoft.public.excel.programming
Pierre62 Pierre62 is offline
external usenet poster
 
Posts: 14
Default Conditional formatting ™£ ™¦ ™¥ ™* NT

Hello Rick,

you're great.
Thanks for your efforts.

Kind regards.
Pierre



"Rick Rothstein" wrote:

1 When I trie to undo something (Ctrl+z), that does not work.


This is a problem with all VB code... it tends to clear out the clipboard.

2 When using the macro, all text turns to black, also the one
I gave another color.


This will fix my macro so it won't do that...

Sub ColorSuitSymbols()
Dim X As Long
Dim R As Range
Dim W As Worksheet
On Error Resume Next
For Each W In Worksheets
For Each R In W.UsedRange
For X = 1 To Len(R.Value)
Select Case AscW(Mid(R.Value, X, 1))
Case 9824
R.Characters(X, 1).Font.ColorIndex = 5
Case 9827
R.Characters(X, 1).Font.ColorIndex = 10
Case 9829
R.Characters(X, 1).Font.ColorIndex = 3
Case 9830
R.Characters(X, 1).Font.ColorIndex = 46
End Select
If X 1 Then
If Mid(R.Value, X - 1, 2) = "NT" Then
R.Characters(X - 1, 2).Font.ColorIndex = 44
End If
End If
Next
Next
Next
End Sub

--
Rick (MVP - Excel)


"Pierre62" wrote in message
...
Hello guys,

I encountered two minor problems.

1 When I trie to undo something (Ctrl+z), that does not work.
2 When using the macro, all text turns to black, also the one I gave
another color.

Is it hard to change this?

Kind regards,
Pierre