Lock / Unlock all the Textboxes or Combo boxes on any Form

Category:
Forms and Controls
Type:
Snippets
Difficulty:
Beginning
Author:
Guganeshan.T (Guhan)

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
USAGE : ADD THIS IN A STANDARD MODULE & CALL FROM ANYWHERE BY : GUGANESHAN.T AACS, MCP PURPOSE : LOCKS/UNLOCKS ALL THE TEXTBOXES AND/OR COMBO BOXES EXAMPLE (In a Click event of a button): LockAllTextboxes Me, True - Will lock them LockAllTextboxes Me, False - Will Unlock them

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: