Microsoft Office Tutorials and References
In Depth Information
What Makes a Good Utility?
Figure 16-3 shows how the UserForm looks for each of the five operations. Notice that the
configuration of the controls varies, depending on which option is selected.
Figure 16-3: The UserForm layout changes for each operation.
The Module1 VBA module
The Module1 VBA module contains the declarations, a simple procedure that starts the utility,
and a procedure that handles the undo operation.
Declarations in the Module1 VBA module
Following are the declarations at the top of the Module1 module:
Public Const APPNAME As String = “Text Tools Utility”
Public Const PROGRESSTHRESHOLD = 2000
Public UserChoices(1 To 8) As Variant ‘stores user’s last choices
Public UndoRange As Range ‘ For undoing
Public UserSelection As Range ‘For undoing
I declare a Public constant containing a string that stores the name of the application. This
string is used in the UserForm caption and in various message boxes.
 
Search JabSto ::




Custom Search