VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



To return only the drive letter. Just paste this code into your Module form.

by Todd Wayman (8 Submissions)
Category: String Manipulation
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Mon 27th January 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

To return only the drive letter. Just paste this code into your Module form.

Rate To return only the drive letter. Just paste this code into your Module form.




'* Start Comment Block  ***********************************
'* Generated using VB 3.0 ToolBar
'* Author: Todd Wayman
'* Date: Jan, 27, 2003
'* Version: 1.00.2003
'* Copyright © 2003 Todd Wayman; All rights reserved.
'* Function Title: Return_Drive
' *************************************************************
'*
'* Disclaimer:
'*
'* This software is provided AS IS without warranty of any kind, either
'* express or implied. This includes without limitation the fitness for
'* a particular purpose or application and any warranties of merchantability.
'* The author shall not be liable for any damage, whether direct, indirect,
'* special, or consequential, arising from a failure of this software or
'* accompanying files to operate in a manner desired by the user. The author
'* shall not be liable for any damage to data or property which may be
'* caused directly or indirectly by the use of this program.
'* By using and/or installing this software YOU assume all responsibility.
'*
'* End Disclaimer
'*
'* Comments:
'* Returns the current drive as a string, letter only.  Comes in handy for getting only drive information
'* with out all the path information.  Easy to use.
'*
'*Symtax: X = Return_Drive()  where X is a String for Testing
'*
'* End Comment Block  *************************************


Dim X

X = CurDir$
Return_Drive = Mid$(X, 1, 1)

End Function


Download this snippet    Add to My Saved Code

To return only the drive letter. Just paste this code into your Module form. Comments

No comments have been posted about To return only the drive letter. Just paste this code into your Module form.. Why not be the first to post a comment about To return only the drive letter. Just paste this code into your Module form..

Post your comment

Subject:
Message:
0/1000 characters