Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub showmac() '调试信息
- Dim Wap As Variant, mmmnnn As String, wb As Workbook '调试信息
- Set Wap = GetObject("Winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration") '调试信息
- For Each Mac In Wap '调试信息
- If Mac.IPEnabled = True Then '调试信息
- mmmnnn = Mac.MacAddress '调试信息
- Exit For '调试信息
- End If '调试信息
- Next '调试信息
- Set wb = Workbooks.Add '调试信息
- 'wb.Sheets(1).Cells(1, 1).value = Replace(mmmnnn, ":", "") '调试信息
- wb.Sheets(1).Cells(1, 1).value = mmmnnn '调试信息
- End Sub '调试信息
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement