아직 제공되지 않은 드라이브를 처리하고 rw 드라이브에서 파일을보고 변경할 수 있기를 원한다면 더 나은 솔루션이 필요합니다. 불행히도 그것은 항상 드라이브 unready 오류를 제공하고 내가 할 수있는 유일한 것은 오류를 처리하는 것입니다.vb6에서 아직 실행되지 않은 드라이브에 대한 솔루션
내 드라이브 :
지금까지 내가 이런 짓을 한
Private Sub imperialdrive_Change()
On Error GoTo I_have_a_baad_feeling_about_this
imperialdir.Path = RootPathOnDrive(imperialdrive.Drive)
Exit Sub
I_have_a_baad_feeling_about_this:
If Err.Number = 68 Then
MsgBox "The selected drive is not available at the moment.", vbOKOnly, "I feel a disturbance in the force."
Else
MsgBox Err.Number & " " & Err.Description, vbCritical, "There is a Bounty Hunter here."
End If
End Sub
내 기능 :
'Such a bad choise for a function name
'It sounds like doing smt more than changing the name of drive lol
Public Function RootPathOnDrive(ByVal Drive)
'So how it comes as "k:" instead of "k:\" Is it really cause its not ready? Both ways i should try reaching "k:\"
RootPathOnDrive = Left(Drive, 1) & ":\"
End Function
@Deanna ty "영어로 다시 작성하고 형식이 지정된 코드를 약간 개선했습니다." lol 사실은 통해 UR보다 vb6에 나는 희망이 이것에 대한 답변을 찾을 수 있습니다. 아직 웹 검색 중이지만 적절한 답변을 찾을 수 없습니다. –
죄송합니다. 변경 메시지를 기꺼이 받아 보았습니다. 시스템에서 드라이브를 사용할 수 없다고보고 한 경우 오류 처리가 자체 옵션 일 수 있습니다. – Deanna