Subs and Functions w/ Optional Args
-
If you have a Sub or Function with an Optional argument passed ByRef, what happens if you try to muniplate the contents of the variable if it wasn't passed in? Eldon Zacek VP of Engineering Czech-Mate Enterprises, LLC
-
If you have a Sub or Function with an Optional argument passed ByRef, what happens if you try to muniplate the contents of the variable if it wasn't passed in? Eldon Zacek VP of Engineering Czech-Mate Enterprises, LLC
VB.NET: All optional variables have a constant default value. If no value is passed in, the argument will have the default value. You can manipulate it as much as you like, but when the procedure exits, your changes will be discarded. VB6: Optional arguments can have default values, in which case the same rules as VB.NET apply. If they don't have a default value, you will get an error when you try to access them. Use the
IsMissing
function to determine whether a value has been passed in.