intrep11
Registered User.
- Local time
- Today, 17:30
- Joined
- Apr 6, 2003
- Messages
- 63
I have hit a bit of a wall and could use some advice
basically i need to grab the computer name of PCs on a network and put them into a table. I have code to access the AD and get me the names of the PCs but am not sure how to put them into a table.
Public Function listcomputers(ndname As String)
Dim cmp As IADsComputer
Set NTDomain = GetObject("WinNT://" & ndname)
NTDomain.Filter = Array("Computer")
' Add the computers in the domain
For Each cmp In NTDomain
computerlist = computerlist & cmp.Name & vbCrLf
Next
Debug.Print computerlist
End Function
how do i get the computer list into a table
basically i need to grab the computer name of PCs on a network and put them into a table. I have code to access the AD and get me the names of the PCs but am not sure how to put them into a table.
Public Function listcomputers(ndname As String)
Dim cmp As IADsComputer
Set NTDomain = GetObject("WinNT://" & ndname)
NTDomain.Filter = Array("Computer")
' Add the computers in the domain
For Each cmp In NTDomain
computerlist = computerlist & cmp.Name & vbCrLf
Next
Debug.Print computerlist
End Function
how do i get the computer list into a table