Interfaces, properties, and events

Situation: 

You want to write a GUI program. One with command buttons, textboxes, and other graphical controls.

Actions: 
  • Design the interface, adding controls to a worksheet. Make it easy for the user to do tasks with the interface.
  • Code works by messing with properties of controls, like Caption, Value, Enabled, and Visible.
  • Code runs in response to events, like Click. Code is in event subs, or called from them.
Explanation: 

VBA defines the control and events. For example, you can't change the name of the Click event to Press.

You still use decomp and abstraction when writing these programs, however. Rather than putting code directly in event subroutines (like click subs), put calls to your own procs in the click subs.