How to create a macro with a command button?

The wizard creates the command button and embeds a macro in the button’s On Click property. The macro contains actions that perform the task you chose in the wizard. In the Navigation Pane, right-click the form that contains the command button, and then click Design View or Layout View on the shortcut menu.
For More Information Please Refer:

You May Also Like to Read: