Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DirListBox  Change Initial Default Drive in Box to a:

Posted on 2003-11-04
3
Medium Priority
?
220 Views
Last Modified: 2008-02-01
I notice when using dirlistbox , the default is c:
ie. the dirlistbox initially shows c:

Is there a way of making the default =   a: ie (initial display)

if i use Drive1.drive=a:   the program tries to open drive a:, but there is no disk there yet.

The dir list box contains  a:   c:  d:  e:    but lights up the c: at load

Also, is there a way of determining if the drive is removeable ie floppy. as i need to format if this is so.??

Appreciate any help offered.

0
Comment
Question by:kennedymr
3 Comments
 
LVL 8

Expert Comment

by:dds110
ID: 9681983
The code you are using is correct, but, unless you have a disk in, it will fail (no way around this that I know of).

As far as determining the drive type?  Take a look at this code here:

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=151

HTH
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 500 total points
ID: 9682314
The DirListBox is simple enough that you can emulate it with your own using a simple combobox if you really want this functionality of setting the floppy as the default.
0
 

Author Comment

by:kennedymr
ID: 9682508
Azarasound, Thanks for your tip. This seems to be the answer to the problem.


Thanks also to dds110 for your help, much appreciated.

Allways Appreciate the help offered

Regards  kennedymr
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

824 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