Reputation: 61
For example Microsoft VBA:
ActiveCell = ActiveCell & <Some Text i want to add with option Size = 20>
How i can implement that description inside "<>" brackets
Upvotes: 1
Views: 662
Reputation: 626
You want to change the ActiveCell.Characters().Font property
Dim CurrentText, SomeText
Dim CurrentTextLen, SomeTextLen
CurrentText = ActiveCell.Value
CurrentTextLen = Len(CurrentText)
SomeText = "Some Text i want to add with option Size = 20"
SomeTextLen = Len(SomeText)
ActiveCell.Value = CurrentText & SomeText
With ActiveCell.Characters(Start:=CurrentTextLen + 1, Length:=SomeTextLen).Font
.Size = 20
End With
For this, you need to know where your <> text starts (i.e. the length of the ActiveCell current contents, plus one)
You will also need the length of your <> text (i.e. the length of the <> text)
Upvotes: 1