Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 422
  • Last Modified:

Run a Module from a Command Button

Using Access 2007.

I've created a Macro in Access.  I then created a Form and Command button that will run the Macro.

I then converted the Macro to a VBA module and added some additional steps to the VBA.  How can I run the converted macro from the same button?  It only gives the option of running macros?

Thanks
0
tfewster500
Asked:
tfewster500
  • 2
1 Solution
 
BardobraveCommented:
Assign macro's name to button's onClick event.
0
 
Rey Obrero (Capricorn1)Commented:
select [Event Procedure] in the click event of the button
0
 
Rey Obrero (Capricorn1)Commented:
select [Event Procedure] in the click event of the button, then click on the (...)

in the vba window

private sub button_click()

' call the function/sub here
end sub
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now