Solved

Clear a FileListBox

Posted on 2004-04-22
6
1,261 Views
Last Modified: 2011-10-07
Hello Experts,
How do you clear the contents of a filelistbox with a click of a button?

cheers.
0
Comment
Question by:sayeed_seher
  • 3
  • 3
6 Comments
 
LVL 2

Expert Comment

by:sbennetts
ID: 10888790
The filelist box is listing the files in the path specified in the path property, you either need to change your path, change your pattern to something that doesn't exist (e.g. *.qza) or make the filelist box invisible.
Simon.
0
 

Author Comment

by:sayeed_seher
ID: 10888835
can I get a code example?
0
 
LVL 2

Expert Comment

by:sbennetts
ID: 10888883
To do which?

myForm.myFileListBox.visible = false

will do it or

myForm.myFileListBox.pattern = "*.qza" 'or another file extension...

Simon.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:sayeed_seher
ID: 10889010
I apologize for the confusion, I should have been clearer in the begining. I have a directorylistbox which when I select a folder, shows the contents in the filelistbox. The user can then select a file from the filelistbox. I would like to put a button that will keep the filelistbox visible, yet clear the contents and at the same time not set the pattern or path because that will not allow it to work with the directorylistbox. Hope that helps.
0
 
LVL 2

Accepted Solution

by:
sbennetts earned 125 total points
ID: 10889113
But the filelistbox has a path and will display the files in that path, until the path or pattern changes, the files in that path will always be displayed.

The best option would be the pattern option to change it to something crazy, then when you want to change the directorylistbox, it sets the path and pattern accordingly...
0
 

Author Comment

by:sayeed_seher
ID: 10889179
Thanks for your help!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to debug this code 7 56
Getting warning: You are about to delete 1 row(s) 9 43
Recommendation vb6 to vb.net or others 14 114
fso.FolderExists("\\server\HiddenFolder$") 4 52
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now