Anyway, here's an example, completely based on this: (Which means, I only did like 1% of the code, just the portion that adds the computers to the Collection)
http://makeashorterlink.com/?N12821E57
Hope it helps you !
<font face=Courier New><SPAN style="color:#00007F">Option</SPAN> <SPAN style="color:#00007F">Explicit</SPAN>
<SPAN style="color:#007F00">' ============== BOF: MNetEnum.bas ==============</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> WNetOpenEnum <SPAN style="color:#00007F">Lib</SPAN> "mpr" Alias "WNetOpenEnumA" ( _
<SPAN style="color:#00007F">ByVal</SPAN> dwScope <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> dwType <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> dwUsage <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, _
lpNetResource <SPAN style="color:#00007F">As</SPAN> Any, lphEnum <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> WNetCloseEnum <SPAN style="color:#00007F">Lib</SPAN> "mpr.dll" ( _
<SPAN style="color:#00007F">ByVal</SPAN> hEnum <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> WNetEnumResource <SPAN style="color:#00007F">Lib</SPAN> "mpr.dll" Alias _
"WNetEnumResourceA" (<SPAN style="color:#00007F">ByVal</SPAN> hEnum <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, lpcCount <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, lpBuffer <SPAN style="color:#00007F">As</SPAN> Any, _
lpBufferSize <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> lstrcpy <SPAN style="color:#00007F">Lib</SPAN> "kernel32" Alias "lstrcpyA" ( _
lpString1 <SPAN style="color:#00007F">As</SPAN> Any, lpString2 <SPAN style="color:#00007F">As</SPAN> Any) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> lstrlen <SPAN style="color:#00007F">Lib</SPAN> "kernel32" Alias "lstrlenA" ( _
lpString <SPAN style="color:#00007F">As</SPAN> Any) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CopyMem <SPAN style="color:#00007F">Lib</SPAN> "kernel32" Alias "RtlMoveMemory" ( _
Destination <SPAN style="color:#00007F">As</SPAN> Any, Source <SPAN style="color:#00007F">As</SPAN> Any, <SPAN style="color:#00007F">ByVal</SPAN> Length <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>)
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Type</SPAN> NETRESOURCE
dwScope <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
dwType <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
dwDisplay<SPAN style="color:#00007F">Type</SPAN> <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
dwUsage <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
lpLocalName <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
lpRemoteName <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
lpComment <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
lpProvider <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#007F00">' lpLocalName As String</SPAN>
<SPAN style="color:#007F00">' lpRemoteName As String</SPAN>
<SPAN style="color:#007F00">' lpComment As String</SPAN>
<SPAN style="color:#007F00">' lpProvider As String</SPAN>
<SPAN style="color:#00007F">End</SPAN> Type
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCE_CONNECTED = &H1
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCE_GLOBALNET = &H2
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCE_REMEMBERED = &H3
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCETYPE_ANY = &H0
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCETYPE_DISK = &H1
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCETYPE_PRINT = &H2
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCETYPE_UNKNOWN = &HFFFF
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCEUSAGE_CONNECTABLE = &H1
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCEUSAGE_CONTAINER = &H2
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCEUSAGE_RESERVED = &H80000000
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCEDISPLAYTYPE_GENERIC = &H0
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCEDISPLAYTYPE_DOMAIN = &H1
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCEDISPLAYTYPE_SERVER = &H2
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCEDISPLAYTYPE_SHARE = &H3
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCEDISPLAYTYPE_FILE = &H4
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> RESOURCEDISPLAYTYPE_GROUP = &H5
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> NO_ERROR = &H0
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> Indent = 2
<SPAN style="color:#00007F">Sub</SPAN> TestIt()
<SPAN style="color:#00007F">Dim</SPAN> Col <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">New</SPAN> Collection
<SPAN style="color:#00007F">Dim</SPAN> i <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
NetEnum Col
Debug.Print "Computers:"
<SPAN style="color:#00007F">For</SPAN> i = 1 <SPAN style="color:#00007F">To</SPAN> Col.Count
Debug.Print Col(i)
<SPAN style="color:#00007F">Next</SPAN> i
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Sub</SPAN> NetEnum(<SPAN style="color:#00007F">ByRef</SPAN> Col <SPAN style="color:#00007F">As</SPAN> Collection)
<SPAN style="color:#00007F">Dim</SPAN> hEnum <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> rc <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> cnt <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> nr <SPAN style="color:#00007F">As</SPAN> NETRESOURCE
<SPAN style="color:#00007F">Dim</SPAN> b() <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> buflen <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#007F00">' start an enumeration process...</SPAN>
rc = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, _
RESOURCEUSAGE_CONTAINER, <SPAN style="color:#00007F">ByVal</SPAN> 0&, hEnum)
<SPAN style="color:#00007F">If</SPAN> rc = NO_ERROR <SPAN style="color:#00007F">Then</SPAN>
buflen = 1024
<SPAN style="color:#00007F">ReDim</SPAN> b(0 <SPAN style="color:#00007F">To</SPAN> buflen - 1) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
<SPAN style="color:#007F00">' get network root</SPAN>
<SPAN style="color:#00007F">Do</SPAN>
cnt = 1
rc = WNetEnumResource(hEnum, cnt, b(0), buflen)
<SPAN style="color:#007F00">' if we have a container, enumerate it...</SPAN>
<SPAN style="color:#00007F">If</SPAN> rc = NO_ERROR <SPAN style="color:#00007F">Then</SPAN>
CopyMem nr, b(0), Len(nr)
Debug.Print PointerToStringA(nr.lpRemoteName)
<SPAN style="color:#00007F">If</SPAN> (nr.dwUsage And RESOURCEUSAGE_CONTAINER) <SPAN style="color:#00007F">Then</SPAN>
<SPAN style="color:#00007F">Call</SPAN> EnumContainers(nr, 1, Col)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">Else</SPAN>
<SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Do</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">Loop</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#007F00">' must close the enumeration handle</SPAN>
rc = WNetCloseEnum(hEnum)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Sub</SPAN> EnumContainers(cntr <SPAN style="color:#00007F">As</SPAN> NETRESOURCE, <SPAN style="color:#00007F">ByVal</SPAN> Level <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, _
<SPAN style="color:#00007F">ByRef</SPAN> Col <SPAN style="color:#00007F">As</SPAN> Collection)
<SPAN style="color:#00007F">Dim</SPAN> hEnum <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> rc <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> cnt <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> nr <SPAN style="color:#00007F">As</SPAN> NETRESOURCE
<SPAN style="color:#00007F">Dim</SPAN> b() <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> buflen <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> sTemp <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>
<SPAN style="color:#007F00">' start an enumeration process</SPAN>
rc = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, _
RESOURCEUSAGE_CONTAINER, cntr, hEnum)
<SPAN style="color:#00007F">If</SPAN> rc = NO_ERROR <SPAN style="color:#00007F">Then</SPAN>
buflen = 1024
<SPAN style="color:#00007F">ReDim</SPAN> b(0 <SPAN style="color:#00007F">To</SPAN> buflen - 1) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
<SPAN style="color:#007F00">' continue the enumeration</SPAN>
<SPAN style="color:#00007F">Do</SPAN>
cnt = 1
rc = WNetEnumResource(hEnum, cnt, b(0), buflen)
<SPAN style="color:#00007F">If</SPAN> rc = NO_ERROR <SPAN style="color:#00007F">Then</SPAN>
CopyMem nr, b(0), Len(nr)
Debug.Print Space(Indent * Level);
<SPAN style="color:#007F00">'Debug.Print PointerToStringA(nr.lpRemoteName)</SPAN>
sTemp = PointerToStringA(nr.lpRemoteName)
<SPAN style="color:#007F00">'Is it a computer</SPAN>
<SPAN style="color:#00007F">If</SPAN> Left$(sTemp, 2) = "\\" <SPAN style="color:#00007F">Then</SPAN>
<SPAN style="color:#007F00">'Doesn't have anything else after it</SPAN>
<SPAN style="color:#00007F">If</SPAN> InStr(3, sTemp, "\", 1) = 0 <SPAN style="color:#00007F">Then</SPAN>
Col.Add Mid$(sTemp, 3)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">If</SPAN> (nr.dwUsage And RESOURCEUSAGE_CONTAINER) <SPAN style="color:#00007F">Then</SPAN>
<SPAN style="color:#00007F">Call</SPAN> EnumContainers(nr, Level + 1, Col)
<SPAN style="color:#00007F">Call</SPAN> EnumConnections(nr, Level + 1, Col)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">Else</SPAN>
<SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Do</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">Loop</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#007F00">' must close the enumeration handle</SPAN>
rc = WNetCloseEnum(hEnum)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Sub</SPAN> EnumConnections(cntr <SPAN style="color:#00007F">As</SPAN> NETRESOURCE, <SPAN style="color:#00007F">ByVal</SPAN> Level <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, _
<SPAN style="color:#00007F">ByRef</SPAN> Col <SPAN style="color:#00007F">As</SPAN> Collection)
<SPAN style="color:#00007F">Dim</SPAN> hEnum <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> rc <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> cnt <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> nr <SPAN style="color:#00007F">As</SPAN> NETRESOURCE
<SPAN style="color:#00007F">Dim</SPAN> b() <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> buflen <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#007F00">' start an enumeration process</SPAN>
rc = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, _
RESOURCEUSAGE_CONNECTABLE, cntr, hEnum)
<SPAN style="color:#00007F">If</SPAN> rc = NO_ERROR <SPAN style="color:#00007F">Then</SPAN>
buflen = 1024
<SPAN style="color:#00007F">ReDim</SPAN> b(0 <SPAN style="color:#00007F">To</SPAN> buflen - 1) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
<SPAN style="color:#007F00">' continue the enumeration</SPAN>
<SPAN style="color:#00007F">Do</SPAN>
cnt = 1
rc = WNetEnumResource(hEnum, cnt, b(0), buflen)
<SPAN style="color:#00007F">If</SPAN> rc = NO_ERROR <SPAN style="color:#00007F">Then</SPAN>
CopyMem nr, b(0), Len(nr)
Debug.Print Space(Indent * Level);
Debug.Print PointerToStringA(nr.lpRemoteName)
<SPAN style="color:#00007F">Else</SPAN>
<SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Do</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">Loop</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#007F00">' must close the enumeration handle</SPAN>
rc = WNetCloseEnum(hEnum)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Function</SPAN> PointerToStringA(lpStringA <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> String
<SPAN style="color:#00007F">Dim</SPAN> Buffer() <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> nLen <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">If</SPAN> lpStringA <SPAN style="color:#00007F">Then</SPAN>
nLen = lstrlen(<SPAN style="color:#00007F">ByVal</SPAN> lpStringA)
<SPAN style="color:#00007F">If</SPAN> nLen <SPAN style="color:#00007F">Then</SPAN>
<SPAN style="color:#00007F">ReDim</SPAN> Buffer(0 <SPAN style="color:#00007F">To</SPAN> (nLen - 1)) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Byte</SPAN>
CopyMem Buffer(0), <SPAN style="color:#00007F">ByVal</SPAN> lpStringA, nLen
PointerToStringA = StrConv(Buffer, vbUnicode)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN>
<SPAN style="color:#007F00">' ============== EOF: MNetEnum.bas ==============</SPAN></FONT>