Hello All!

I have too much time on my hands at my new job. This leads to tinkering with things I don't fully understand, which ultimately, has lead to this post. Here is my scenario:

I have a QA checklist for my process. There are 84 rules/test questions. Based on a combination of factors only certain rules/questions apply to a given instance. I have successfully written subs to display only applicable test questions based on the selection of factors. No Problem.

Next, I added Command Buttons from the ActiveX Controls Menu, with subs that display message boxes (MsgBox) containing the rule for each test question. The Rules are on a separate sheet, each with a named range that matches the name of the Command Button. I have successfully written subs to Display, Hide and Move the Command Buttons so that they are visible next to the displayed test questions.

Where I'm at now - I have 84 subs for 84 command buttons. Note in the sample of my 84 subs below that the Sub names Rule3_click() etc., are the names of both the command buttons and the named range where the rule resides, Sheet3.Range("rule3") etc.

Below is a sample of the rudimentary subs I'm using. So question:
- How can I use one sub which is used by all command buttons to identify the name of the button that was clicked, like "Rule3" and display in the message box, the rule in the named range, like "Rule3", that matches the name of the command button?

Private Sub Rule3_Click()
'Displays a message box with the rules related to the test question
Dim Range1 As Range
Set Range1 = Sheet3.Range("Rule3")
MsgBox (Range1)
End Sub

Private Sub Rule4_Click()
'Displays a message box with the rules related to the test question
Dim Range1 As Range
Set Range1 = Sheet3.Range("Rule4")
MsgBox (Range1)
End Sub

Private Sub Rule5_Click()
'Displays a message box with the rules related to the test question
Dim Range1 As Range
Set Range1 = Sheet3.Range("Rule5")
MsgBox (Range1)
End Sub

etc...

Is it necessary to retain 84 subs? It works fine like it is, but I am curious. I have seen on this and other sites, ways to make this work with Buttons from the Forms menu, but I get errors with the ActiveX Command Buttons. Much of the information I have found is very dated though, so perhaps there is something new.

Thanks!