CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2001
    Posts
    6

    How to read DirList box names?

    Any one know how to read names of folder in a dirlistbox? (im not lookking for path)
    i want to set up a for/next loop to read the name of all folders listed in a dirlistbox

    Thanks!


  2. #2
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: How to read DirList box names?

    Play with the code below and see if it helps.

    1. Create new project with a form (Form1).
    2. Add DirListBox on the Form1 (Dir1).

    private sub Form_Load()
    Dir1.Path = "C:\"
    end sub

    private sub Dir1_Click()
    dim i as integer
    for i = 0 to (Dir1.ListCount-1)
    debug.print i & ". " & Dir1.List(i)
    next i
    end sub




    -Cool Bizs

    Good Luck,
    -Cool Bizs

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

Featured