![]() |
find mac address of my own computer by excell macro
I am using excell 2002. I want to find mac address of my own computer by
excell macro. |
find mac address of my own computer by excell macro
Give something like this a try.
'---------------------------------- Sub GetMAC() Dim strLine As String Dim bEther As Boolean bEther = False Set wsh = CreateObject("WScript.Shell") Set wshExec = wsh.Exec("ipconfig /all") Set objStdOut = wshExec.StdOut Do Until objStdOut.AtEndOfStream strLine = objStdOut.ReadLine If InStr(strLine, "Ethernet") 0 Then bEther = True End If If InStr(strLine, "Physical Address") 0 And bEther Then strLine = Right(strLine, 17) Exit Do End If Loop MsgBox strLine Set wshExec = Nothing Set wsh = Nothing End Sub '---------------------------------- Steve Yandl "INQUISITIVE DISCIPLE" <INQUISITIVE wrote in message ... I am using excell 2002. I want to find mac address of my own computer by excell macro. |
Steve
the below formula is great but is it possable to enter the MAC address in to a cell (eg A1 Sheet1) instead of a message box regards chris Quote:
|
All times are GMT +1. The time now is 09:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com