Lesson 1 - Introduction
When to Use a UserForm?
What to Use a UserForm For?
Common Controls
Gathering Requirements
Envision the Application
Now Where?
Lesson 2 - Controls Part 1
Controls and the Toolbox
Topics Common to ActiveX controls
Labels
TextBoxes
Using VBE (Visual Basic Editor)
VBE ToolBars
VBE Windows and Panes
TextBoxes (continued)
CommandButtons
ToggleButtons
ListBox
Properties Unique to ListBox and ComboBox
ComboBox
Scrollbar
Lesson 3 - Controls Part 2
OptionButtons and Checkboxes
CheckBoxes
OptionButtons
OptionButton with a Control Source
TripleState Property
SpinButtons
TabStrips and MultiPages
TabStrip Control
MultiPage Control
Entering or Editing Records with MultiPage
Image
Lesson 4 - Layout and Startup
Beginning the Layout Design
First Stage – Rough Layout
Big Decision – How Many Pages?
The Right Controls for the Right Task
Whether to Use ComboBox or ListBox
Editing the Layout
Grouping Controls
The Format Menu
Tabbing
Starting and Stopping UserForm
Initializing UserForm
Initializing UserForm Controls
Initializing ComboBox and ListBox Lists-
Initializing ComboBox and ListBox Selection
Formatting
Initializing TabStrip and MultiPage
Lesson 5 - UserForm Code
General VBA Coding Practices
Dating Modules and Macros
Exported Module Naming Convention
Option Explicit
Variable Naming and Typing
Variable Default Values
Declaring Variables and Constants
Dynamic and Fixed-Size Arrays
Readability - Consistent Look and Feel
Indenting
Space-Underscore Line Extension
Commenting
Commenting End Statements
UserForm Specific Coding
Three Module Types
Me Keyword and Other Handy Tips
Design Time vs Run Time
Show, Hide, Load, and Unload
Passing Values Between Control and Worksheet
Via Control ControlSource and a Cell Address
Via Code and the Value Property
Via Control RowSource and a Range of Cells
Selecting from ComboBox and Single-Select ListBox
Selecting from Multiple-Select ListBox
Reusing Controls and UserForms
Copying a UserForm
Exporting a UserForm
Copying a Control From One UserForm to Another
Adding a Control to the Toolbox
Lesson 6 - Initialising Userform Controls
Choosing the Initializing Method
Bound Data
Hiding Data in Cells
Initializing with AddItem
Filling Using AddItem Loops
Replacing Data During UserForm Run-time
Initializing with a Range Address
Initializing with an Array
Multicolumn ComboBoxes and ListBoxes
ColumnCount
ColumnWidth
ColumnHeads
BoundColumn and TextColumn
Lesson 7 - Testing Debugging
UserForm Test
Initial State Inspection
Invalid, Incorrect, and Missing Data
Control in Wrong State
Control Format Incorrect
Test checklist
Stepping Through Code
Step Into
Step Out
Dragging the Yellow Bar
Step Over
Reset
UserForm Debug
VBE (Visual Basic Editor)
Stop Statement
Breakpoint
Step Into, Step Over
MsgBox
Debug Object
Log File
Watch Window
Notes
Which Debug Method to Use?
Lesson 8 - Userform Events
UserForm Order of Events
Control Events
Focus Change
Mouse Movement
Mouse Clicking
Drag And Drop
Keyboard Keystrokes
Error
ByVal References in Microsoft Forms
Lesson 9 - Validating User Input
Listing Valid Choices
Selecting Files from GetOpenFilename
Parsing Full Path Names
Selecting a Number from SpinButton
Selecting with CheckBoxes and OptionButtons
ComboBox and Listbox
Adding Entries to Lists
Add by AddItem
Add and Expand RowSource
Checking for Valid Choices
When to Apply Validation
Sources of Invalid Data
Code Cautions for Testing Data
Examples of Verification by Code
Check if Number
Check if Text
Check if Date
Check if Time
Check if Cell Address
Check if Email
Check if Exists Already
Check if File or Folder Exists
Handling Invalid Data
On Error
MsgBox
Log File
Set Focus
Accumulating Validation Errors
Digital Signatures and Certificates
Creating and Removing Controls at Runtime
Add Method
Remove Method
Finding the Active Control
Creating a Template Control
Two Additional Controls
RefEdit Control
Date and Time Picker (DTPicker) Control
Utilities
chgDirIfNeeded
Asynchronous Hardware Actions
Microsoft ® and Microsoft Excel ® are registered trademarks of Microsoft Corporation. OzGrid.com is in no way associated with Microsoft.
OzGrid.com accepts no responsibility for any adverse affect that may result from undertaking our training.