Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • Leaders
Posted

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.

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...