![]() |
[VBscript] Function cannot return a collection
I've made a small function which gets the system drives filters them based on ready state and also if they are not a mapped network drive and then returns the collection to the calling code, like so:
Code:
Function getLocalFixedDrives() Code:
getLocalFixedDrives = LocalFixedDrivesColl Wouldn't it just be easier it VBscript utilized the 'return' statement for returning objects from methods?!?!? argh! |
Try
Code:
set getLocalFixedDrives = LocalFixedDrivesColl You might also want to tell the function what kind of value it's going to return as in Code:
Function myfunction() as MyClass |
awesome. thanks zen_tom!
|
All times are GMT -8. The time now is 10:08 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project