Device ID with Excel VBA

三世轮回 提交于 2020-01-23 17:35:07

问题


I would like to extract the IMEI number/Device ID from the computer using excel.

In CMD I can do it in this way: :netsh mbn sh interface" and from the list given I take the Device ID.

I was tryong to find something online but no luck so far, that's why I'm asking your help, maybe some of you knows where to search or how to start.

How can I do this with excel vba?


回答1:


You can use the following and then use split function to extract what you need

Option Explicit

Public Sub TEST()
   Debug.Print CreateObject("wscript.shell").exec("cmd /V /C netsh mbn show interface").StdOut.ReadAll
End Sub



回答2:


Yes, Thank you. I only had time to try it out today. Thank you once more.



来源:https://stackoverflow.com/questions/54709575/device-id-with-excel-vba

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!