ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Onclick button actions (https://www.excelbanter.com/excel-programming/415155-onclick-button-actions.html)

[email protected]

Onclick button actions
 
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

Chrisso

Onclick button actions
 
Try:

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

This will get you the buttons text.

Chrisso



All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com