Dim x as myObjectRather than,
set x = new myObject
Dim x as new myObject
The former is more efficient as, using the later, the compiler will need to insert heaps of code around the "x" object each time it is used.
See this link for an elegant expalnation http://visualbasic.ittoolbox.com/groups/technical-functional/visualbasic-l/adodb-creating-new-94396
No comments:
Post a Comment