Easly find the letter of the drive in which your .exe is running, like C or D. only 1 line of code
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.
Rate Easly find the letter of the drive in which your .exe is running, like C or D. only 1 line of code
(2(2 Vote))
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.
Easly find the letter of the drive in which your .exe is running, like C or D. only 1 line of code Comments
No comments yet — be the first to post one!
Post a Comment