Scan my network for any shared folders

  • Thread starter Thread starter Eugene via OfficeKB.com
  • Start date Start date
E

Eugene via OfficeKB.com

Hi!

Actually did not know where to post this message, as there is no separate
group for VBA.
How do I look for shared resources in my network? I've walked through the
search results and found a code that uses the scripting object technique to
access shares, but it only works locally. Did anyone tried to develop such a
solution?

Appreciate any help you may provide.

Thanks,
Eugene
 
Yes, I did, and followed the instructions to create that tool, but it doesn't
return anything.
Also, I noted in the code that it is designed to list all shared resources on
my machine, not on the network. Should I always know the remote machine's
name to be able to retrieve its shared resources?


Eugene,
Did you read the link ?

If you had, you would have seen it is in VB, usable in VBA.
The site has been around a lot longer than VB.Net.

NickHK
Thanks, but I'm looking for a VBA solution, not a VB.Net.
[quoted text clipped - 9 lines]
 
Randy's code is pretty solid, so I would guess the problem lies with
how/what you are doing, not his code.

And if you check the code you will see:
'demo using the local machine
bServer = "\\" & Environ$("COMPUTERNAME") & vbNullString

So you need to give it the name of the remote server instead.
Check related pages on that site to see the code to obtain a list of
computers on your network.

NickHK

ekim via OfficeKB.com said:
Yes, I did, and followed the instructions to create that tool, but it doesn't
return anything.
Also, I noted in the code that it is designed to list all shared resources on
my machine, not on the network. Should I always know the remote machine's
name to be able to retrieve its shared resources?


Eugene,
Did you read the link ?

If you had, you would have seen it is in VB, usable in VBA.
The site has been around a lot longer than VB.Net.

NickHK
Thanks, but I'm looking for a VBA solution, not a VB.Net.
[quoted text clipped - 9 lines]
Thanks,
Eugene
 
Yes, that piece of code is the reason I decided it is for local machine.

Big thanks to you, Nick.


Randy's code is pretty solid, so I would guess the problem lies with
how/what you are doing, not his code.

And if you check the code you will see:
'demo using the local machine
bServer = "\\" & Environ$("COMPUTERNAME") & vbNullString

So you need to give it the name of the remote server instead.
Check related pages on that site to see the code to obtain a list of
computers on your network.

NickHK
Yes, I did, and followed the instructions to create that tool, but it doesn't
return anything.
[quoted text clipped - 15 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top