Solved

Clear a FileListBox

Posted on 2004-04-22
6
1,265 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

831 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