I'm currently using the following code to get a listing of all the domains in my LAN. It works fine, but every once in a while, GetObject returns nothing, and I have to recursively call the same routine untill it returns data. I'm confused as to why this is happenning. Can someone help?
Here is the code:
Dim objNS As IADsContainer
Dim objDomain As IADs
Set objNS = GetObject("WinNT:")
For Each objDomain In objNS
If cmbDomain.ListCount = 0 Then
* This is an extension of the following question :