Is it possible to have one subroutine to cover the click event of many buttons?
I have a whole column of buttons, in a spreadsheet, that call a public routine, "rowpick", to display further info from an MS Access database. Each button detirmines which data to extract depending on a cell in the row it is next to in the Excel Spreadsheet.
I currently have a a private sub for each button but I am expanding to 200 or more rows.
HTML Code:Private Sub cmdDetails14_Click() rowpick (14) End SubIs there away to get a variable into the button subroutine and use it for a loop or something so I only need one subroutine that can detirmine which button has been pushed?Code:Public Sub rowpick(n As Byte)




Reply With Quote