Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Network Neighbourhood - my neighbours?

Posted on 2001-06-14
7
Medium Priority
?
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 

Accepted Solution

by:
vbhelper earned 400 total points
ID: 6194640
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
ID: 6194710
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Expert Comment

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

hongjun
0
 
LVL 28

Expert Comment

by:Ark
ID: 6197418
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
ID: 6199297
riaz9, you got to reply.

hongjun
0
 
LVL 1

Author Comment

by:riaz9
ID: 6217220
thanx for the all the help
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

604 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