Tools Links Login

Validate_Drive

Validates whether a given hard/floppy/network drive is valid

Original Author: Ian Ippolito (psc)

Inputs

strDrive--drive to validate

Returns

i the dirve exists returns TRUE, otherwise FALSE

Code

Function Validate_Drive (ByVal strDrive As String)

  On Error GoTo BAD2
    'Dim strOldDrive As String
    'strOldDrive = Get_Drive_Name(CurDir$)
    ChDrive (strDrive)
    'ChDrive (strOldDrive)
  On Error GoTo 0
  Validate_Drive = True
Exit Function
BAD2:
  Validate_Drive = False
  Resume Exit2
Exit2:
  Exit Function

End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 96 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.