Coding
I've heard that using END is dangerous; what's the best way to end my program?
Compatibility:VB3
VB4
VB5
To end your program, use this code:
dim ret as object
for each ret in forms
unload ret
set ret = nothing
next
What does it mean to pass by reference?
Compatibility:VB3
VB4
VB5
When you pass by reference, you get the actual variable. (You pass by reference by default.)
In contrast, when passing by value, you get a copy of the variable.
The net effect is passing by value prevents you from changing the variable
What is Option Explicit and why should I use it?
Compatibility:VB3
VB4
VB5
When you use Option Explicit, you have to declare all of your variables.
For instance:
sub mySub()
dim i as integer
i = 3 'Works with either
x = 3 'Works only when option explicit is disabled.
...
end sub
How can I break up long lines of VB code?
Compatibility:VB3
VB4
VB5
Use a space followed by a underscore,
like this:
debug.print "Hi! "; _
"World!"
Copyright 2000, David J Berube<Form1@aol.com>. All Rights Reserved.