|
-
Dec 12th, 2001, 06:47 AM
#1
Thread Starter
Hyperactive Member
Error trapping when changing drive
Hi all,
I have a form with a dirlistbox and a drivelistbox.
When I change my drive to a: and there's no disk inserted it generates an arro6 68. But it isn't trapped. Can someone help me please?
VB Code:
Private Sub Drive1_Change()
On Error GoTo HSB_ErrorMsg
Dir1.Path = Drive1.Drive
Exit Sub
HSB_ErrorMsg:
Screen.MousePointer = vbDefault
MsgBox "An error occured during this action " & vbCrLf & Err.Number & " : " & Err.Description, vbExclamation, "HSB Error: HSBMng 1002"
End Sub
-
Dec 12th, 2001, 06:59 AM
#2
Frenzied Member
Works on NT4
What OS are you using?
-
Dec 12th, 2001, 07:02 AM
#3
Thread Starter
Hyperactive Member
-
Dec 12th, 2001, 10:25 PM
#4
Drive, Dir & File box
Private Sub Drive1_Change()
On Error GoTo HSB_ErrorMsg
Dir1.Path = Drive1.Drive
Exit Sub
HSB_ErrorMsg:
If Err.Number = 68 Then
MsgBox Err.Description & vbCrLf & "Please insert disk into the drive."
Drive1.Drive = CurDir
Else
MsgBox "An error occured during this action " & vbCrLf & Err.Number & " : " & Err.Description, vbExclamation, "HSB Error: HSBMng 1002"
End If
End Sub
Private Sub Dir1_Change()
On Error Resume Next
File1.Path = Dir1.Path
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|