Fire_Chief
Well-known Member
- Joined
- Jun 21, 2003
- Messages
- 693
- Office Version
- 365
- Platform
- Windows
What code can I use to find the serial number of my computer?
Below is what I have been using but I have discovered it is not the serial number
that is on the computer.
I now do not know what the number I do get represents.
Public Function GetSerialNumber() As String
Dim objs As Object
Dim Obj As Object
Dim WMI As Object
Dim sAns As String
Set WMI = GetObject("WinMgmts:")
Set objs = WMI.InstancesOf("Win32_BaseBoard")
For Each Obj In objs
sAns = sAns & Obj.SerialNumber
If sAns < objs.Count Then sAns = sAns & ","
Next
SerialNumber = sAns
End Function
Below is what I have been using but I have discovered it is not the serial number
that is on the computer.
I now do not know what the number I do get represents.
Public Function GetSerialNumber() As String
Dim objs As Object
Dim Obj As Object
Dim WMI As Object
Dim sAns As String
Set WMI = GetObject("WinMgmts:")
Set objs = WMI.InstancesOf("Win32_BaseBoard")
For Each Obj In objs
sAns = sAns & Obj.SerialNumber
If sAns < objs.Count Then sAns = sAns & ","
Next
SerialNumber = sAns
End Function