Populating Your Form


Your form now works well, but it does not do anything. You need to put some controls on it to interact with the user . These can be combo boxes, text boxes, or command buttons . First, the mouse event code that you inserted in the last section needs to be removed or you will still get the message boxes when you move the mouse over the running form. Remove the code in the toolbox window. This normally appears to the left of your form and contains the most popular controls. If it is not visible, click the UserForm, and the toolbox window will appear, as shown in Figure 9-5. The toolbox displays icons for the controls that are available to you.


Figure 9-5: The Toolbox window

To place a control onto your form, simply click it in the toolbox and drag it to the required position on your form. You can subsequently drag it to a new position on the form or resize it by dragging on the handles around the edge of the control. To see what a control is (if it is not apparent from the icon), place your cursor on the icon and view the tooltip text.




Excel VBA Macro Programming
Excel VBA Macro Programming
ISBN: 0072231440
EAN: 2147483647
Year: 2004
Pages: 141

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net