What is passing by reference?
Arguments are either passed by reference or by value. When they are passed by value, they cannot be changed by the procedure or function they are passed to. They *can* be altered when passed by reference, since passing by reference is just passing the address. Note that procedures are less strict about variable types when you use BYVAL. If you declare that your Sub takes a Variant, VB takes that seriously and gives a nasty “mismatch error” if you try to pass ie. a string to it. Make it ByVal (at the cost of some speed) and your sub will be more tolerant. Commented by :shabir_aspnet@yahoo.co.