Results 1 to 15 of 15

Thread: [RESOLVED] GetDirectories and Listbox's help

Threaded View

  1. #5
    Lively Member blacksaibot's Avatar
    Join Date
    Jan 2009
    Location
    East Coast, USA
    Posts
    94

    Re: GetDirectories and Listbox's help

    It has to be a String since you're concatenating it with a string and storing it as one in your code.

    dim sLB1SelectedFirst as String = ""

    can you post code where ever you have that variable?

    Does this change anything?
    sLb1SelectedFirst = ListBox1.SelectedItem.ToString

    It sounds like the contents of the listbox1 is not even a string datatype because it's trying to convert FROM directoryinfo INTO a string.
    You are adding directoryinfos into your listbox that are not string datatypes (you're first block of code)


    FORGET ALL THAT TRASH ABOVE.

    Try doing this.

    sLb1SelectedFirst = ListBox1.SelectedItem.FullName
    This will give the full file path as a string. However, it looks like you don't want the full path within concatenation... is it just the file name you want?
    Last edited by blacksaibot; Feb 15th, 2011 at 12:21 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width