Solved

How to get CD TYPE?

Posted on 1998-06-10
2
124 Views
Last Modified: 2012-08-14
How to get a CD info, using VB. I mean is in the CD-ROM AudioCD or Data CD?

thank you.
0
Comment
Question by:beciakk
  • 2
2 Comments
 
LVL 7

Accepted Solution

by:
kamall earned 60 total points
ID: 1463026
You can use a file list box and set its path to the CD-ROM drive, then refresh it using File1.Refresh . Then check if the file list box has any items in the ListCount property. If it has, then the CD is a Data CD.
Regards
0
 
LVL 7

Expert Comment

by:kamall
ID: 1463027
Oh..., one thing I forgot....
You must put:
On Error Resume Next
at the beginning of your code in the SUB where you put the code for the File list box, because otherwise you will get an error if the CD is an Audio CD or when there is no CD in the drive.
Regards
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

679 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