Solved

Network Neighbourhood - my neighbours?

Posted on 2001-06-14
7
198 Views
Last Modified: 2012-05-04
Hi,

I'm Riaz.  I would like to know how to programatically (in VB) find out all the computers active on the network currently - like windows explorer shows them when you click on Network Neighbourhood.

thanx in advance
0
Comment
Question by:riaz9
7 Comments
 
LVL 33

Expert Comment

by:hongjun
Comment Utility
0
 

Accepted Solution

by:
vbhelper earned 100 total points
Comment Utility
NOTE: You may not see the Active DS Type Library in the list of available References. To add the Library to the list:

Click Browse.

 -Go to the Windows\System folder or WinNT\System32 folder.
 -Select the file ActiveDS.tlb.
 -From now on, the Active DS Type Library is among the list of available References.


Dim dc As IADsDomain
Dim n As IADsComputer
 
 Set dc = GetObject("WinNT://DomainName")
 dc.Filter = Array("Computer")
 For Each n In dc
    Debug.Print n.Name
 
 Next
 Set dc = Nothing
 Set n = Nothing

Cheer's
0
 
LVL 43

Expert Comment

by:TimCottee
Comment Utility
vbhelper, you are not new to EE so you should be fully aware of the guidelines on comments vs answers. Whilst your "answer" does indeed contribute to this thread it cannot be construed as the 100% definitive solution. Please restrain from posting "answers" in this manner or your account will be referred to customer services for possible penalty. I would ask you to withdraw your answer but as this is currently not available I would hope that your answer is rejected and considered fairly with the posts from hongjun. IMO the MVPS link provides a fast and efficient solution to this without having to install additional components such as the ADSI stuff. You are fully aware that the questioner may accept any comment as an answer at any time and as such your posting of an answer is in fact irrelevant. All that it achieves is to move the question into the locked area thus reducing the chance of other experts to contribute.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 33

Expert Comment

by:hongjun
Comment Utility
vbhelper, yours work only on NT version. Use my first link which will work for all windows version.

hongjun
0
 
LVL 27

Expert Comment

by:Ark
Comment Utility
Hi
Add listbox to your form:

Private Sub Form_Load()
  Const ssfNETWORK = &H12
  Dim oShell, fld, fldItm
  Set oShell = CreateObject("Shell.Application")
  Set fld = oShell.NameSpace(ssfNETWORK)
  For Each fldItm In fld.Items
     List1.AddItem fldItm.Name
  Next
  Set fldItm = Nothing
  Set fld = Nothing
  Set oShell = Nothing
End Sub

Cheers
0
 
LVL 33

Expert Comment

by:hongjun
Comment Utility
riaz9, you got to reply.

hongjun
0
 
LVL 1

Author Comment

by:riaz9
Comment Utility
thanx for the all the help
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now