COPIA Y PEGA ESTO EN UN MODULO:
Option Explicit
Private Declare Function GetVolumeSerialNumber Lib "kernel32.dll" Alias _
"GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal _
lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, _
lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, _
lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal _
nFileSystemNameSize As Long) As Long
Public Function VolumeSerialNumber(ByVal RootPath As String) As String
Dim VolLabel As String
Dim VolSize As Long
Dim Serial As Long
Dim MaxLen As Long
Dim Flags As Long
Dim Name As String
Dim NameSize As Long
Dim s As String
If GetVolumeSerialNumber(RootPath, VolLabel, VolSize, Serial, MaxLen, _
Flags, Name, NameSize) Then
s = Format(Hex(Serial), "00000000")
VolumeSerialNumber = Left(s, 4) + "-" + Right(s, 4)
Else
'En caso de error saldrá este número
VolumeSerialNumber = "0000-0000"
End If
End Function