Reputation: 1
How do I fill the currently selected cell with predetermined and formatted text?
For example if cell A1
is highlighted, if I click a button named Greetings
, it'll fill cell A1
with text "Hello"
in bold, if I click a button named Food
, it'll fill cell A1
with bread (linebreak) ham (linebreak) mayo
in red.
Upvotes: 0
Views: 2165
Reputation: 96753
Create a set of small subs like:
Sub Greetings()
With ActiveCell
.Clear
.Value = "Hello"
.Font.Bold = True
End With
End Sub
and assign them to the appropriate buttons.
Upvotes: 1