VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ValidateDrive

by Ian Ippolito (vWorker) (14 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

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

Inputs
strDrive--drive to validate
Code Returns
i the dirve exists returns TRUE, otherwise FALSE

Rate ValidateDrive

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

Download this snippet    Add to My Saved Code

ValidateDrive Comments

No comments have been posted about ValidateDrive. Why not be the first to post a comment about ValidateDrive.

Post your comment

Subject:
Message:
0/1000 characters