|
Software
Snippet
|
Snippet, Visual Basic 5 Add-in for developers. Snippet allows Visual Basic 5 programmers to keep a VB5 aware code and notes library.
|
Download Snippet now.
Beta testers, make sure you read all the Read Me, I need your feedback!
Snippet has a few main goals:
- Provide a VB code fragment and notes library in a more convenient organization than multiple BAS files.
- Provide a more simple way to insert common error handling code in any procedure.
Snippet allows you to define several place-holder variables that can be replaced when you request Snippet to paste into VB. For example, Snippet has a variable named %author% which represents your name. You can use %author% in any of your snippets and Snippet will replace all occurences of %author% with your choice. In addition, Snippet is aware of the name of the procedure that you are editing and has a variable named %proc% to represent it. This handy feature allows you to create useful snippets for error handling that dynamically change based on current procedure. For example you could create a snippet containing:
Const ksProc = "%proc%"
On Error GoTo %proc%Err
'------------------------------------------------------
' Put code here.
'------------------------------------------------------
%proc%Exit:
' Put normal exit code here.
%proc%Err:
' Put error handling code here, for example
Msgbox "An Error occurred in " & ksProc
If you asked Snippet to paste this snippet into a Form_Load event, you would get:
Const ksProc = "Form_Load"
On Error GoTo Form_LoadErr
'------------------------------------------------------
' Put code here.
'------------------------------------------------------
Form_LoadExit:
' Put normal exit code here.
Form_LoadErr:
' Put error handling code here, for example
Msgbox "An Error occurred in " & ksProc
A sample of Snippet's main window
|