Visual Basic for Applications
15
Visual Basic for Applications Class III
description
Visual Basic for Applications. Class III. User Forms. We place controls on User Forms to get input from the user. Common controls include text boxes, command buttons, and check boxes. Forms and controls can both trigger events that our programs can respond to. Controls. Events. - PowerPoint PPT Presentation
Transcript of Visual Basic for Applications
Visual Basic for Applications
Class III
User Forms We place controls on User Forms to get
input from the user. Common controls include text boxes,
command buttons, and check boxes. Forms and controls can both trigger events that our programs can respond to.
Controls
Events Any action, e.g. clicking a button, opening
a form, etc. generates an event. VBA handles events by sending them to
procedures named Object_Event. Example: If click on a button named cmdPressMe then VBA will try to run a procedure named cmdPressMe_Click
Insert: UserForm
Labels
Text Boxes
Combo Box
Adding Items to Combo Box
Command Buttons
Adding Code to Buttons
RefEdit
Building a Web Browser