|
Visual Basic (VB and VBA) |
|
Copyright 1999-2001 Christopher Greaves. All rights reserved. Home Page and email to [email protected] |
| If in doubt, record a macro and inspect the entrails! |
Please read the DISCLAIMER.
Here is an INDEX to all the procedures.
You will probably need one copy of my GLOBAL DECLARATIONS.
Public Function boolValidate_Drive(ByVal strDrive As String)
' Procedure : boolValidate_Drive
' Description: Return the set of live drives from a set of possibles.
' Copyright: Chris Greaves Inc.
' Inputs: A string of letters. Usually a-z.
' Returns: Only letters which correspond to an active drive available to this system.
' Assumes: Nothing
' Side Effects: None.
' Tested: By the calls shown below.
boolValidate_Drive = False
If Len(strDrive) = 2 Then
If boolAlphaOnly(Left(strDrive, 1)) Then
If Mid(strDrive, 2, 1) = ":" Then
On Error GoTo BAD2
Dir (strDrive)
On Error GoTo 0
boolValidate_Drive = True
Exit Function
BAD2:
Resume Exit2
Exit2:
Exit Function
End If
End If
End If
End Function
| We all knew nothing when we started … |
|
Home Page and Contact Information Send email to [email protected]. This page was last updated Thursday, November 15, 2001 |