Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "zhj23" wrote: Thanks for the various suggestions. I would look into them. zhj23. "zhj23" wrote: For mobility reasons, I store all my VBA programmes in a thumb drive (USB). And in some of my VBA programmes, also contain the drive path with the associated drive letters. (e.g. opening a file) As I add more USB devices to my PC, these drive letters keep changing such that the VBA programme can't read the correct drive letter where the files are stored. Any solution to fix the drive letter? Thanks. zhj23 Maybe you could also try naming your USB drives and then getting the drive letter: Sub getUSBDrive() Set fso = CreateObject _ ("Scripting.FileSystemObject") For Each drive In fso.Drives If drive.IsReady Then If UCase(drive.VolumeName) = "MYUSBDRIVE" Then Debug.Print drive.VolumeName, drive.DriveLetter End If End If Next End Sub -- urkec |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Obtain drive letter assignment of CD/DVD drive? | Excel Discussion (Misc queries) | |||
changing drive letter in custom macro toolbar buttons | Excel Programming | |||
Help to Indentify a drive letter | Excel Programming | |||
Using path instead of drive letter | Excel Programming | |||
How to find the drive letter? | Excel Programming |