Warum probierst Du das nicht einfach aus...
17.11.2016 16:51:21
Michael
Bonduca?
Mit meinem Codegerüst kannst Du doch perfekt experimentieren...
Aber fragen ist irgendwie einfacher, gell?! ¯\_(ツ)_/¯
Sub TextfelderErstellen()
Dim Wb As Workbook: Set Wb = ThisWorkbook
Dim Ws As Worksheet: Set Ws = Wb.Worksheets(1)
Dim Texte As Range, t As Range
With Ws
Set Texte = .Range("A1:A" & .Cells(.Rows.Count, 1).End(xlUp).Row)
For Each t In Texte
With .Shapes.AddTextbox(msoTextOrientationHorizontal, t.Offset(, 2).Left, _
t.Offset(, 2).Top, t.Offset(, 2).Width, _
t.Offset(, 2).Height)
.TextFrame.Characters.Text = t.Text
.TextFrame2.TextRange.Font.Size = 8
Select Case t.Offset(, 1).Text
Case Is = "rot"
.TextFrame.Characters.Font.Color = RGB(255, 0, 0)
Case Is = "grün"
.TextFrame.Characters.Font.Color = RGB(0, 176, 80)
End Select
End With
Next t
End With
End Sub
LG
Michael