M Marishah Warren Dec 31, 2003 #1 Hey is it possible to run a code in the click event of commandbutton10 on workbook open? Thanks Todd Huttenstine
Hey is it possible to run a code in the click event of commandbutton10 on workbook open? Thanks Todd Huttenstine
N Nigel Dec 31, 2003 #2 Not sure if this is the best method, but an approach I have used is to create separate procedures for the events that you want to run manually. Eg Sub Workbook_Open() Call SubRoutine1 End Sub Sub CommandButton10_Click() Call SubRoutine1 End sub Public Sub SubRoutine1() 'Common code in here which runs for workbook open and CommandButton10 End Sub Cheers N
Not sure if this is the best method, but an approach I have used is to create separate procedures for the events that you want to run manually. Eg Sub Workbook_Open() Call SubRoutine1 End Sub Sub CommandButton10_Click() Call SubRoutine1 End sub Public Sub SubRoutine1() 'Common code in here which runs for workbook open and CommandButton10 End Sub Cheers N