10-02-2007, 04:12 AM
how do u know if something should be
sub hi() or funtion hi()
sub hi() or funtion hi()
|
subs and functions
|
|
10-02-2007, 04:12 AM
how do u know if something should be
sub hi() or funtion hi()
10-02-2007, 04:44 AM
Function returns a value, sub does not. In the end, it can do the same thing, it just depends on how you want to do it.
Code: Dim I as longCode: Dim I as LongIn the end, I = 2 * 2 both ways. The "ByRef" means that it is "By Reference" instead of "By Value". If you pass as ByRef, and change that value, it changes the variable used in the call. |
|
« Next Oldest | Next Newest »
|