AW: Markierung von Text
23.09.2003 10:57:22
Nike
Hi,
einfach mal den Makrorekorder mitlaufen lassen,
dann kommt z.B. so was raus:
Sub Makro1()
ActiveCell.FormulaR1C1 = "test"
With ActiveCell.Characters(Start:=1, Length:=1).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With ActiveCell.Characters(Start:=2, Length:=3).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 3
End With
Range("A2").Select
End Sub
Das könnte man jetzt auch auf das Wesentliche reduzieren,
wenn man z.B. die Buchstaben nur rot haben möchte:
Sub Aenderung()
With Range("A1").Characters(Start:=2, Length:=3).Font
.ColorIndex = 3
End With
End Sub
Was willst du denn machen?
Bye
Nike