User-defined type variable not allowed in expression
A variable of a user-defined type must be passed by reference in a Sub or Function callit cannot be passed by value (i.e., as an expression). For example, Sub1 Record is allowed, but Sub1 (Record) produces this error. Note that you can pass an element of a user-defined type by value. For example, Sub1 (Record.Element1) is allowed if Element1 is an fundamental data type -- that is, Integer, Long, Single, Double, Currency, String or Variant.