Onclick button actions

D

dstansbie

Good morning all,

Is it possible to click a self made button in a Excel worksheet that
then carries a value into a macro?

I want to have a page where when a button is pressed ie November the
value is carried to a macro that then inserts it into the open file
code.

There is probably an easier way to do this but this is a challenge.

thanks

Dave
 
C

Chrisso

Try:

Sub Your_Button1_Click()
Debug.Print
ActiveSheet.Shapes(Application.Caller).TextFrame.Characters.Text
End Sub

This will get you the buttons text.

Chrisso
 

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

Top