Home  |  About  |   Search   

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

RunCommand Constants

Terms of Use


 

General: Reading a drive's Volume Label

Author(s)
Paul van Goudoever

if we're just interested in the volume label, and nothing else, it's much easier to use the Dir function instead.

?Dir("C:",vbVolume)

That's it!

For additional information, you will need to use GetVolumeInformation API.

And while we're on the subject of Volume Labels.... Yes, this value changes every time a drive is formatted. No, there's no way in VBA (that I know of) to retrieve the manufacturer's serial number or the BIOS number. And yes, using this technique for copy-protection will cause endless headaches to your users.


© 1998-2009, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer