excel vba 获取主板序列号
Sub主板序列号()DimobjsAsObject,ObjAsObject,WMIAsObject,主板序列号SetWMI=GetObject("WinMgmts:")S...
Sub 主板序列号()
Dim objs As Object, Obj As Object, WMI As Object, 主板序列号
Set WMI = GetObject("WinMgmts:")
Set objs = WMI.InstancesOf("Win32_BaseBoard")
For Each Obj In objs
MsgBox "您的主板序列号是:" + Obj.SerialNumber
Next
Sheets("sheet1").Cells(3, 1).Value = WMI'-----------------------
End Sub
想获取主板序列号,但是带横线的这句老是出错,求解答 展开
Dim objs As Object, Obj As Object, WMI As Object, 主板序列号
Set WMI = GetObject("WinMgmts:")
Set objs = WMI.InstancesOf("Win32_BaseBoard")
For Each Obj In objs
MsgBox "您的主板序列号是:" + Obj.SerialNumber
Next
Sheets("sheet1").Cells(3, 1).Value = WMI'-----------------------
End Sub
想获取主板序列号,但是带横线的这句老是出错,求解答 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询