View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default String Font Color VBA

one way:

Sub test()
aString = "Hello World!"
bString = "Adios World"
ActiveCell.Value = aString & " " & bString
With ActiveCell
.Font.ColorIndex = 5
.Characters(1, Len(aString)).Font.ColorIndex = 3
End With
End Sub


--


Gary


wrote in message
ups.com...
Hello all!

I am wondering how to specify a font color for a string in VBA. For
example, using the following,

aString="Hello World!"
bString="Adios World"
ActiveCell.Value = aString & " " & bString

how would I ammend to make aString Red and Bstring Blue?

Any help is appreciated.

Mac