lost assign macro?

  • Thread starter Thread starter chief
  • Start date Start date
When you right click the command button you see an option for "Vie
Code" the VBA Editor will appear in the sub called "Command1_Click"
You will need to type "Call" and then the name of your macro

Close the VBE window and then press your command button
 
Double click on the commandbutton and you'll see this type of code:

Option Explicit
Private Sub CommandButton1_Click()

End Sub


Just change it call your old macro:

Option Explicit
Private Sub CommandButton1_Click()
Call youroldmacronamehere
End Sub

(You'll have to be in design mode (also on the control toolbox toolbar) before
you double click. And remember to toggle design mode off when you're done.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top