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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top