J
jay
How do you verify if a drive is ready using vba?
That is Cdrom, zip and usb drives.
I tried the vba below however it errors on a drive letter
that is not there such as a removed usb drive. It works with
the Zip and Cdrom but when a usb drive is removed it errors.
Dim fs, d
Set fs = CreateObject("Scripting.FilesSystemObject")
Set d = fs.GetDrive("h:")
If d.IsReady Then
Do this and that
End If
That is Cdrom, zip and usb drives.
I tried the vba below however it errors on a drive letter
that is not there such as a removed usb drive. It works with
the Zip and Cdrom but when a usb drive is removed it errors.
Dim fs, d
Set fs = CreateObject("Scripting.FilesSystemObject")
Set d = fs.GetDrive("h:")
If d.IsReady Then
Do this and that
End If