Hi,
I want to read a PC's MAC address and copy it to a worksheet. I have a code that works (see attached). I work on WindowsXP with Excel2002.
The problem is that I had to put a MsgBox on line 19. If I remove the MsgBox command the sh.Exec on line 4 seems to be executed too slowly before opening MAC.txt on line 21. The code is executed but Sheet1 remains empty. That is why I put the MsgBox break.
Does anyone know an elegant way to get rid of this MsgBox? I do not want to bother a user every single time with the MsgBox.
I have tried pause commands or loops which check the existence of the MAC.txt file, but without success.
If someone knows a better way to identify the MAC address alone, i.e. without the "Physical....", this would be even better
Help appreciated.
g
Bookmarks