
May 9th, 2008, 03:09 PM
|
 |
Slaprentice of Wolves
|
|
Join Date: Aug 2007
Location: Mossville, IL
|
|
Quote: | Originally Posted by canarchy so then what is creating the error? | Invoking New on an instance of a data type and not the data type itself. You have
Dim objCollection = New objFolder.SubFolders, but SubFolders is a Property that is an instance of some data type -- thus, being already instantiated, the New doesn't make sense here. The correct statement would be something like:
Code:
Dim objCollection as Object = objFolder.SubFolders
where Object is whatever data type is being returned by the SubFolders property.
I cant' tell from your code -- objFolder is an instance of what class?
__________________
Wolffy
------------------------
Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Rework for your specific environment may be required. Void where prohibited by law. Not valid in California. Your mileage may vary. Not FDIC insured
Last edited by Wolffy : May 9th, 2008 at 03:12 PM.
|