Solved

DirListBox  Change Initial Default Drive in Box to a:

Posted on 2003-11-04
3
215 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 125 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

617 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