visual basic for applications class iii. user forms we place controls on user forms to get input...

15
Visual Basic for Applications Class III

Post on 21-Dec-2015

220 views

Category:

Documents


1 download

TRANSCRIPT

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

Example Controls

Building a Web Browser

Data Table