Hello,
I am creating an inventory stationary stock list at the school I work at. It will be accessible to 5 members of staff who use the stationary cupboard.
When a member of staff takes a ream of paper they can click the paper button under their name, which will indicate they have taken one ream of paper and subtract it off the paper stock.
There is in excess of 200 buttons, do I need to code each one individually or is there a way to copy the code and it automatically change the button name and cell numbers?
Example of code
next button
I am creating an inventory stationary stock list at the school I work at. It will be accessible to 5 members of staff who use the stationary cupboard.
When a member of staff takes a ream of paper they can click the paper button under their name, which will indicate they have taken one ream of paper and subtract it off the paper stock.
There is in excess of 200 buttons, do I need to code each one individually or is there a way to copy the code and it automatically change the button name and cell numbers?
Example of code
Code:
Private Sub MCR1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Sheets("sheet1").Range("d4").Value = Sheets("sheet1").Range("d4").Value + 1
End Sub
next button
Code:
Private Sub MCR2_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Sheets("sheet1").Range("d5").Value = Sheets("sheet1").Range("d5").Value + 1
End Sub
Last edited: