Hello,
I’m trying to run a subroutine(s) from a command button on a form.
Originally I was running the Subs directly from buttons on the worksheet. However, I am getting too many buttons so I decided to create a separate form with all the buttons. Then there is only one button on the worksheet that opens my form (frmControlCenter) with all the other buttons. Most of these are working fine. However, there are a couple that return errors. The one Sub in particular I am working on is called cmdRESET_Click() where I am attempting to run to previous worksheet button's sub called cmdClearALL_Click.
Here is my code on the form that I am attempting to run cmdClearALL_Click():
Not sure if it matters but I should note, Sheet1 is named "Amoritze".
Here is the error and highlighted coding problem:
Any suggestions would be appreciated.
Thanks for viewing,
Steve K.
I’m trying to run a subroutine(s) from a command button on a form.
Originally I was running the Subs directly from buttons on the worksheet. However, I am getting too many buttons so I decided to create a separate form with all the buttons. Then there is only one button on the worksheet that opens my form (frmControlCenter) with all the other buttons. Most of these are working fine. However, there are a couple that return errors. The one Sub in particular I am working on is called cmdRESET_Click() where I am attempting to run to previous worksheet button's sub called cmdClearALL_Click.
Here is my code on the form that I am attempting to run cmdClearALL_Click():
Not sure if it matters but I should note, Sheet1 is named "Amoritze".
VBA Code:
Private Sub cmdRESET_Click()
Application.Run "Sheet1.ClearALL_Click"
End Sub
Here is the error and highlighted coding problem:
Any suggestions would be appreciated.
Thanks for viewing,
Steve K.
Last edited: