Two suggestions:
(1)
If you really want the computers' serial numbers in your building, then walk through the building to each computer, and write down the numbers as they appear on their label.
(2)
That number won't mean anything, because hardware can be easily swapped, so whatever the serial number was when it left the factory can be misrepresented by altered specifications (swapped hard drive, added ram, etc). Besides, that label can be scratched off or replaced with a fake label. What you would be better off identifying is one or more hardware components to give you more of a truly unique identification of the PC.
Paste the following code in a standard module just as you see it here, and run the macro named "CompSpex". It will give you the computer's hard drive serial number and processor serial number, which is a combination that won't likely exist anywhere else on planet earth.
Option Explicit
Public ProcNum As String
Sub ProcessorNumber()
With Application
.ScreenUpdating = False
.DisplayAlerts = False
.EnableEvents = False
Dim WMI As Object, WQL As String, Proc As Object, Procs As Object, i As Integer
Sheets.Add
i = 1
Set WMI = GetObject("winmgmts:")
WQL = "select * from win32_processor"
Set Procs = WMI.ExecQuery(WQL)
For Each Proc In Procs
Cells(i, 1).Value = Proc.getObjectText_
i = i + 1
Next Proc
Set WMI = Nothing
Set Procs = Nothing
With Range("B1")
.Formula = "=CLEAN(MID(RC1,SEARCH(""{"",RC1)+1,SEARCH(""}"",RC1)-SEARCH(""{"",RC1)-1))"
.Value = .Value
End With
Range("B1").TextToColumns Destination:=Range("B1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, Other:=True, OtherChar:=";", FieldInfo:=Array( _
Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), _
Array(13, 1), Array(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1), _
Array(19, 1), Array(20, 1), Array(21, 1), Array(22, 1), Array(23, 1), Array(24, 1), _
Array(25, 1), Array(26, 1), Array(27, 1), Array(28, 1), Array(29, 1), Array(30, 1), _
Array(31, 1), Array(32, 1), Array(33, 1))
Range("B1:AG1").Copy
Range("B2").PasteSpecial Paste:=xlPasteAll, Transpose:=True
Application.CutCopyMode = False
Columns(1).Delete
Rows(1).Delete
Columns(1).TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, Other:=True, OtherChar:="=", FieldInfo:=Array( _
Array(1, 1), Array(2, 1))
ProcNum = .Trim(.Substitute(Range("B20").Value, Chr(34), ""))
ActiveSheet.Delete
.EnableEvents = True
.DisplayAlerts = True
.ScreenUpdating = True
End With
End Sub
Function DriveSerialNumber() As String
Dim FSO As Object
Set FSO = CreateObject("Scripting.FileSystemObject")
DriveSerialNumber = Format(CDbl(FSO.Drives("C:").SerialNumber))
End Function
Sub CompSpex()
Run "ProcessorNumber"
MsgBox "Processor number is: " & ProcNum & vbCrLf & "Hard drive serial number is: " & DriveSerialNumber
End Sub