Top Banner
Visual Basic for Applications Class III
15

Visual Basic for Applications

Feb 22, 2016

Download

Documents

Jarvis Jarvis

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
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Visual Basic for Applications

Visual Basic for Applications

Class III

Page 2: Visual Basic for Applications

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.

Page 3: Visual Basic for Applications

Controls

Page 4: Visual Basic for Applications

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

Page 5: Visual Basic for Applications

Insert: UserForm

Page 6: Visual Basic for Applications

Labels

Page 7: Visual Basic for Applications

Text Boxes

Page 8: Visual Basic for Applications

Combo Box

Page 9: Visual Basic for Applications

Adding Items to Combo Box

Page 10: Visual Basic for Applications

Command Buttons

Page 11: Visual Basic for Applications

Adding Code to Buttons

Page 12: Visual Basic for Applications

RefEdit