Running command button click event code

  • Thread starter Thread starter Marishah Warren
  • Start date Start date
M

Marishah Warren

Hey is it possible to run a code in the click event of commandbutton10 on
workbook open?

Thanks

Todd Huttenstine
 
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
 
Back
Top