Help wanted with file list boxes and list boxes 
Author Message
 Help wanted with file list boxes and list boxes

Hi, What I would like to achieve is to program a add all button in a form
that would add all the files in a FILE LIST BOX to a LIST BOX, unfotuneately
the books I have aquired does not go into that, and i am struggling to get
the right code, could someone help please

Example

File list Box                                List Box
------------                                ---------
Test1.exe                                    Test1
Test2.exe                                    Test2
Test3.exe                                    Test3
Test4.exe                                    Test4



Fri, 10 Dec 2004 17:34:01 GMT  
 Help wanted with file list boxes and list boxes
Charl,

Something like this :

Dim iSub as Integer
Dim sItem as String

List1.Clear
For iSub = 0 To FileList1.ListCount - 1
    sItem = FileList1.List( iSub )
    List1.AddItem Left( sItem, InstrRev( sItem, "." ) - 1 )
Next

HTH,
    Phill  W.


Quote:
> Hi, What I would like to achieve is to program a add all button in a
form
> that would add all the files in a FILE LIST BOX to a LIST BOX,
unfotuneately
> the books I have aquired does not go into that, and i am struggling to
get
> the right code, could someone help please

> Example

> File list Box                                List Box
> ------------                                ---------
> Test1.exe                                    Test1
> Test2.exe                                    Test2
> Test3.exe                                    Test3
> Test4.exe                                    Test4



Sat, 11 Dec 2004 19:13:53 GMT  
 Help wanted with file list boxes and list boxes
Option Explicit

Private Sub Command1_Click()
    Dim L9&
    List1.Clear
    For L9 = 0 To File1.ListCount - 1
        List1.AddItem File1.List(L9)
    Next
End Sub

On Mon, 24 Jun 2002 11:34:01 +0200, "Charl Burger"

Quote:

>Hi, What I would like to achieve is to program a add all button in a form
>that would add all the files in a FILE LIST BOX to a LIST BOX, unfotuneately
>the books I have aquired does not go into that, and i am struggling to get
>the right code, could someone help please

>Example

>File list Box                                List Box
>------------                                ---------
>Test1.exe                                    Test1
>Test2.exe                                    Test2
>Test3.exe                                    Test3
>Test4.exe                                    Test4



Sat, 11 Dec 2004 19:39:42 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to list macro names in a combo box or a list box

2. VB List Box Versus Access List Box

3. Q: List Box to List Box Code

4. List box within List box

5. List box within List box

6. List box within List box

7. Reading file name from text box and/or File List Box

8. Help Wanted: Quick & Easy List Box Saving

9. Listing files.TXT in a List Box

10. Help! List Check List Boxes

11. Adding multiple items from File Box to List box

12. VB6 - file list box / drive box question - resolving network paths and computer names

 

 
Powered by phpBB® Forum Software