0

I'm new to VBA and stuck with my project.

I have several Command Buttons on my worksheet and they all refer to an ID that should be used later on for calculations. I named the buttons Button_ID1, Button_ID2, ...

The idea is that I extract the name of a particular commend button after clicking and use the ID number as a variable later on. I've seen many solutions already but most if them are for UserForm and I have my command buttons simple inserted to the sheet. It's a really simple code but since the number of buttons change according to the code I would need to manually type it to every Click event.

Any help is appreciated!

Sub Button_ID1_Click()
    selID = 1
End Sub
Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Banki67
  • 1
  • 1

0 Answers0