We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Checking disk in drive A:

g6yassin
g6yassin asked
on
Medium Priority
170 Views
Last Modified: 2012-05-04
I would like a VB code for the following pseudo code
 
 if no disk in drive A them
   msgBox ..
 end if

 if disk has problem(like unformated or damaged) then
    msgBox ..
 end if
Comment
Watch Question

Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
How about
on error go to handle_err:

chdrive "a"
handle_err:
 if err = 68 then 'device unavailable
    msgbox

Commented:
that'll work too... Filecopy was just an example of the operation he was goign to perform.   I wouldn't use IF though.. Select Case is faster.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.