by Sam Witney (7 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 20th December 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Easly find the letter of the drive in which your .exe is running, like C or D. only 1 line of code needed!!! + Documented code, to show what
API Declarations
'Just place the code in any Sub, or any point in your program, a command button for example.
driveletter$ = Left(App.Path, 1) ' make driveletter$ the app path, and then take the 1st chr from the left
MsgBox "This program is being run from drive " & driveletter, vbInformation ' this displays the drive letter, but is not needed
' use driveletter$ to replace any value where a drive letter is needed.
No comments have been posted about Easly find the letter of the drive in which your .exe is running, like C or D. only 1 line of code . Why not be the first to post a comment about Easly find the letter of the drive in which your .exe is running, like C or D. only 1 line of code .