Using Visual Basic for Applications Code

The native programming language for Microsoft Office
More powerful and flexible alternative to macros
Ch 10: attached a macro to a command button user clicks button
Click event occurs
macro runs
Ch 11: attached VB code to a command button
user clicks button
Click event occurs
VBA procedure runs
Procedure
subroutine
function
Module a container for related VBA code procedures each Form object and Report object can have its own module
Standard Module objects contain VBA code independent of forms/reports

Event
A state, condition, or occurrence on/with a certain object for which you can define a response most events occur as a result of a user action
e.g.: a mouse click, a key press, navigate to another record
Events provide an opportunity for your application to do something
Access can run a macro (or a Visual Basic procedure) in response to an event
attach a macro (or VB code) to a form or control and have it run when a specified event occurs
Access has hundreds of events

Get download pdf Using Visual Basic for Applications Code

Related Tutorial

Tags: , , , , , , , , , , , , ,

Comments

Leave a Reply