الاخوه الافاضل
لدى هذه المعادله
والخاصه باستخراج سيريال الهارد
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
الخطأ يحدث على بعض الاجهزه
ويقف عند السطر
ReDim SNList(1 To Count, 1 To 1)
ارجو المساعده