Loading the form
Every time we wanted to use the form so far, we had to run it from the VBA Editor. This is not ideal for users, you might agree. We need some way of making the form available from within the spreadsheet itself. The most effective way of achieving that is to create a button in the spreadsheet, which will launch the dialog box.
In this recipe, we will be loading a form.
Getting ready
Make sure that Controls.xlsm
is still open. New Record Entry Form should be visible, and both the Project window and the Properties window should be visible on the left of the VBA Editor.
How to do it…
We need to do the following:
- Switch back to Excel and make sure that Sheet1 is active. Click on Developer | Controls | Insert | ActiveX Controls | Command Button:
- Click to the right of the table to insert a command button of default size. Instead of returning to the VBA Editor to edit its properties...