Ten VBA Tips and Tricks: Bonus Chapter 2
Ten VBA Tips and Tricks: Bonus Chapter 2
Ten VBA Tips and Tricks: Bonus Chapter 2
his chapter contains a list of ten clever tricks Ive developed (or acquired
from other users) over the years.
If your macro uses a custom dialog box, make sure to turn screen updating
back on before displaying the UserForm. Otherwise, moving the dialog box
on the screen leaves an ugly trail.
This procedure uses one argument: a value that ranges from 0 to 1.0. The
macro simply displays a message that indicates the percent completed. To
return the status bar back to normal, execute the following statement:
Application.StatusBar = False
If you would like this statement automatically added to each new module,
follow these steps:
1. Activate the VBE and choose ToolsOptions.
2. In the Options dialog box, click the Editor tab.
3. Place a check mark next to Require Variable Declaration.