James has attended:
Excel Introduction course
Excel Intermediate course
Excel Advanced course
VBA
Simple VBA -
Create a button that once pressed will create text in another cell.
Could I get a step by step that simply shows
please?
Thanks
RE: VBA
Hi James
Thanks for your question.
Here are steps to create a button that adds text to a cell in a worksheet.
1. Press Alt+F11 to open the VB Editor.
2. Select Insert, Module and and type the following macro into Module1
Sub Title()
Range("A1") = "An automated title"
End Sub
This puts the text "An automated title" into cell A1 of the current worksheet.
To get a button to run this macro...
3. Back on the worksheet select Insert, Shapes and draw a button of your choice.
4. Right click and pick assign macro. Choose the macro Title.
The button should now work. To add text to the button itself such as Click to add a title - right click the button and choose Edit text. This allow you to type into the button.
You can edit the macro to suit and choose a different cell to enter the title text. Or you can choose
Activecell = "An automated title"
The text would then get typed into the current active cell on the worksheet.
Our VBA Introduction training takes you through similar macros and more details.
Hope that answers your question.
Regards
Doug Dunn
STL