'Type 'Items' not defined'

Worf

Newcomer
Joined
Dec 19, 2008
Messages
17
Hi.

For some reason i am getting 'Type 'Items' not defined' in bold and i am not sure why.

Anyone here can help?


For Each i As Items In ListBoxControl2.Items
My.Computer.FileSystem.CopyFilei.name, "C:\SFE\Temp\wallpaper\" + i.shortname)
Next

Many Thanks

Worf
 
The syntax for a for-each statement is:

For Each variable As type in Collection
' Code
Next


You are specifying Items as the variable type of i. Try changing Items to Object. If your listbox will contain only one type of object, you can specify a more specific type.
 
Back
Top