Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Handling Form Events

An event-driven language is one in which code can respond to specific events, such as a user clicking a command button or selecting an item from a list. The procedure can then take appropriate action, whether it’s validating the user’s input or asking for confirmation of the requested action. A form responds to more than 20 separate events, including activating and deactivating the form, displaying the form, clicking the form, and resizing the form.

For each event associated with an object, VBA has set up mini procedures called event handlers. These procedures are really just Sub and End Sub statements. You process the event by filling in your own VBA code between these statements. Here are the steps to follow:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint