devxlogo

VolumeLabel – Read the label of a disk volume

VolumeLabel – Read the label of a disk volume

' Return the volume label of a disk' Pass a null string for the current diskFunction VolumeLabel(drive As String) As String    Dim temp As String    On Error Resume Next    temp = Dir$(drive, vbVolume)    ' remove the period after the eigth character    VolumeLabel = Left$(temp, 8) + Mid$(temp, 9)End Function

devx-admin

Share the Post: