Code for macros

  • Thread starter Thread starter Davoucci
  • Start date Start date
D

Davoucci

Hi, im kinda new to programming macros with excel but have lots of
experience in doing the basics with functions and formulas. What im
looking for is for a macro code that will add text to a certain cell.
for example clicking on the button "Hello" will add "Hello" to cell
A1.
 
Assign this macro to your button:

Sub AddHello()
Range("A1") = "Hello"
End Sub

Regards

Trevor
 
Back
Top