Hi Mahesh Thanks for reply, I tried ur code it shows no result. I changed it like this , if u know more about the mistake pls help me to correct it.
Sub test1() Dim strComputer As String Dim objWMIService As Object Dim colAdapters As Object Dim objAdapter As Object strComputer = "." Set objWMIService = GetObject _ ("winmgmts:" & "!\\" & strComputer & "\root\cimv2") Set colAdapters = objWMIService.ExecQuery _ ("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True") For Each objAdapter In colAdapters Cells(1, 1) = "Physical address: " & objAdapter.MACAddress Next objAdapter End Sub On 5/29/11, Mahesh parab <mahes...@gmail.com> wrote: > Hi > > try: > For Each objAdapter In colAdapters > Cells(1, 1) = "Physical address: " & objAdapter.MACAddress > Next objAdapter > End Sub > > On Sun, May 29, 2011 at 4:46 PM, Rajesh K R > <rajeshkainikk...@gmail.com>wrote: > >> HI >> >> What are the changes required to get the result in a cell instead of msg >> box. >> >> Regards >> >> Rajesh kainikkara >> >> >> On 5/28/11, GoldenLance <samde...@gmail.com> wrote: >> > This is because MAC addresses are attached physically to the network >> > adapter hardware and not to the base computer itself. Computers with >> > multiple network adapters installed (sometimes called multihomed >> > systems) therefore possess multiple unique MAC addresses. >> > >> > On May 28, 7:47 pm, Mahesh parab <mahes...@gmail.com> wrote: >> >> Hi Rajesh >> >> >> >> dont know about this in details, other way you can enter ipconfig/all >> >> in >> >> cmd >> >> prompt and find Physical address i.e MAC address >> >> check info on below linkhttp://ecs.rutgers.edu/physicaladdr.php3 >> >> Thanks >> >> Mahesh >> >> On Sat, May 28, 2011 at 7:16 PM, Rajesh K R >> >> <rajeshkainikk...@gmail.com>wrote: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > Hi >> >> > Thanks for the reply. It shows two different results eg >> >> > 00.1C:10:F2:FO:C6 then 00:10:IF:08:15 >> >> > what does it mean will u explain it a little bit more. >> >> >> >> > Reagards & Thanks >> >> >> >> > Rajesh kainikkara >> >> >> >> > On 5/27/11, Mahesh parab <mahes...@gmail.com> wrote: >> >> > > Hi Rajesh >> >> > > Try: >> >> > > Sub test() >> >> > > Dim strComputer As String >> >> > > Dim objWMIService As Object >> >> > > Dim colAdapters As Object >> >> > > Dim objAdapter As Object >> >> > > strComputer = "." >> >> > > Set objWMIService = GetObject _ >> >> > > ("winmgmts:" & "!\\" & strComputer & "\root\cimv2") >> >> > > Set colAdapters = objWMIService.ExecQuery _ >> >> > > ("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = >> >> > True") >> >> > > For Each objAdapter In colAdapters >> >> > > MsgBox "Physical address: " & objAdapter.MACAddress >> >> > > Next objAdapter >> >> > > End Sub >> >> >> >> > > On Fri, May 27, 2011 at 8:37 PM, Rajesh K R >> >> > > <rajeshkainikk...@gmail.com>wrote: >> >> >> >> > >> Hi Experts >> >> >> >> > >> Is there any code to get MAC address of the computer. >> >> >> >> > >> Regards >> >> > >> Rajesh kainikkara >> >> >> >> > >> -- >> >> >> >> > >> ---------------------------------------------------------------------------------- >> >> > >> Some important links for excel users: >> >> > >> 1. Follow us on TWITTER for tips tricks and links : >> >> > >>http://twitter.com/exceldailytip >> >> > >> 2. Join our LinkedIN group >> >> > >> @http://www.linkedin.com/groups?gid=1871310 >> >> > >> 3. Excel tutorials athttp://www.excel-macros.blogspot.com >> >> > >> 4. Learn VBA Macros athttp://www.quickvba.blogspot.com >> >> > >> 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com >> >> >> >> > >> To post to this group, send email to excel-macros@googlegroups.com >> >> >> >> > >> <><><><><><><><><><><><><><><><><><><><><><> >> >> > >> Like our page on facebook , Just follow below link >> >> > >>http://www.facebook.com/discussexcel >> >> >> >> > > -- >> >> >> >> > >> ---------------------------------------------------------------------------------- >> >> > > Some important links for excel users: >> >> > > 1. Follow us on TWITTER for tips tricks and links : >> >> > >http://twitter.com/exceldailytip >> >> > > 2. Join our LinkedIN group @ >> http://www.linkedin.com/groups?gid=1871310 >> >> > > 3. Excel tutorials athttp://www.excel-macros.blogspot.com >> >> > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com >> >> > > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com >> >> >> >> > > To post to this group, send email to excel-macros@googlegroups.com >> >> >> >> > > <><><><><><><><><><><><><><><><><><><><><><> >> >> > > Like our page on facebook , Just follow below link >> >> > >http://www.facebook.com/discussexcel >> >> >> >> > -- >> >> >> >> > >> ---------------------------------------------------------------------------------- >> >> > Some important links for excel users: >> >> > 1. Follow us on TWITTER for tips tricks and links : >> >> >http://twitter.com/exceldailytip >> >> > 2. Join our LinkedIN group @ >> http://www.linkedin.com/groups?gid=1871310 >> >> > 3. Excel tutorials athttp://www.excel-macros.blogspot.com >> >> > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com >> >> > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com >> >> >> >> > To post to this group, send email to excel-macros@googlegroups.com >> >> >> >> > <><><><><><><><><><><><><><><><><><><><><><> >> >> > Like our page on facebook , Just follow below link >> >> >http://www.facebook.com/discussexcel >> > >> > -- >> > >> ---------------------------------------------------------------------------------- >> > Some important links for excel users: >> > 1. Follow us on TWITTER for tips tricks and links : >> > http://twitter.com/exceldailytip >> > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >> > 3. Excel tutorials at http://www.excel-macros.blogspot.com >> > 4. Learn VBA Macros at http://www.quickvba.blogspot.com >> > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >> > >> > To post to this group, send email to excel-macros@googlegroups.com >> > >> > <><><><><><><><><><><><><><><><><><><><><><> >> > Like our page on facebook , Just follow below link >> > http://www.facebook.com/discussexcel >> > >> >> -- >> >> ---------------------------------------------------------------------------------- >> Some important links for excel users: >> 1. Follow us on TWITTER for tips tricks and links : >> http://twitter.com/exceldailytip >> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >> 3. Excel tutorials at http://www.excel-macros.blogspot.com >> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >> >> To post to this group, send email to excel-macros@googlegroups.com >> >> <><><><><><><><><><><><><><><><><><><><><><> >> Like our page on facebook , Just follow below link >> http://www.facebook.com/discussexcel >> > > -- > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel