Prev: #Value! cell
Next: controlling chart location
From: INQUISITIVE DISCIPLE INQUISITIVE on 12 Mar 2010 12:09 I am using excell 2002. I want to find mac address of my own computer by excell macro.
From: Steve Yandl on 12 Mar 2010 15:44 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 DISCIPLE(a)discussions.microsoft.com> wrote in message news:639C3D14-44AB-4CBF-9CFA-578B182F98E4(a)microsoft.com... > I am using excell 2002. I want to find mac address of my own computer by > excell macro.
|
Pages: 1 Prev: #Value! cell Next: controlling chart location |