Give this a try
'Declare the following in the declarations section of your code
Private Declare Function GetVolumeInformation Lib "kernel32.dll" _
Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, _
ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Integer, _
lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, _
lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, _
ByVal nFileSystemNameSize As Long) As Long
'GetSerialNumber Procedure - Put this in the module or form where it is called.
Function GetSerialNumber(sDrive As String) As Long
Dim SerialNum As Long
Dim Res As Long
Dim tmp1 As String
Dim tmp2 As String
tmp1 = String$(255, Chr$(0))
tmp2 = String$(255, Chr$(0))
'call the API function
Res = GetVolumeInformation(sDrive, tmp1, Len(tmp1), SerialNum, 0, 0, tmp2, Len(tmp2))
'return the serial number of the drive
GetSerialNumber = SerialNum
End Function
Hope this works for you. Anything is possible, the problem is I only have one lifetime.
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)