Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using excell 2002. I want to find mac address of my own computer by
excell macro. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#3
![]() |
|||
|
|||
![]()
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:
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
(Excel 2007) API to get computer IP address or domain name? | Excel Programming | |||
using filer command in excell it locks up my computer | Excel Worksheet Functions | |||
Excel /vba / computer IP address | Excel Discussion (Misc queries) | |||
Excel /vba / computer IP address | Excel Programming | |||
Excel /vba / computer IP address | Excel Programming |