Solved

Clear a FileListBox

Posted on 2004-04-22
6
1,253 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

706 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

20 Experts available now in Live!

Get 1:1 Help Now