Found this code to get the serial number:
Function GetPhysicalSerial() As Variant
Dim obj As Object
Dim WMI As Object
Dim SNList() As String, i As Long, Count As Long
Set WMI = GetObject("WinMgmts:")
For Each obj In WMI.InstancesOf("Win32_PhysicalMedia")
If obj.SerialNumber <> "" Then Count = Count + 1
Next
ReDim SNList(1 To Count, 1 To 1)
i = 1
For Each obj In WMI.InstancesOf("Win32_PhysicalMedia")
SNList(i, 1) = obj.SerialNumber
i = i + 1
If i > Count Then Exit For
Next
GetPhysicalSerial = SNList
End Function
Paste into a VB code module, then enter =GetPhysicalSerial() anywhere on a worksheet. If you have more than one physical hard drive enter as an array function to return the serial number for each drive.
Credit to:
Doug Jenkins
Interactive Design Services
http://www.eng-tips.com/viewthread.cfm?qid=285948
Regards
Bookmarks