ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scan my network for any shared folders (https://www.excelbanter.com/excel-programming/389092-scan-my-network-any-shared-folders.html)

Eugene via OfficeKB.com

Scan my network for any shared folders
 
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

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200705/1


NickHK

Scan my network for any shared folders
 
Eugene,
Maybe this:
http://vbnet.mvps.org/code/network/netshareenum.htm

NickHK

"Eugene via OfficeKB.com" <u32520@uwe wrote in message
news:71f53abe3343e@uwe...
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

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200705/1




ekim via OfficeKB.com

Scan my network for any shared folders
 
Thanks, but I'm looking for a VBA solution, not a VB.Net.


NickHK wrote:
Eugene,
Maybe this:
http://vbnet.mvps.org/code/network/netshareenum.htm

NickHK

Hi!

[quoted text clipped - 9 lines]
Thanks,
Eugene


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200705/1


NickHK

Scan my network for any shared folders
 
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

"ekim via OfficeKB.com" <u32520@uwe wrote in message
news:7204b9f311450@uwe...
Thanks, but I'm looking for a VBA solution, not a VB.Net.


NickHK wrote:
Eugene,
Maybe this:
http://vbnet.mvps.org/code/network/netshareenum.htm

NickHK

Hi!

[quoted text clipped - 9 lines]
Thanks,
Eugene


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200705/1




ekim via OfficeKB.com

Scan my network for any shared folders
 
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?



NickHK wrote:
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


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200705/1


NickHK

Scan my network for any shared folders
 
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" <u32520@uwe wrote in message
news:728bbde82a290@uwe...
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?



NickHK wrote:
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


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200705/1




Eugene via OfficeKB.com

Scan my network for any shared folders
 
Yes, that piece of code is the reason I decided it is for local machine.

Big thanks to you, Nick.



NickHK wrote:
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]
Thanks,
Eugene


--
Message posted via http://www.officekb.com



All times are GMT +1. The time now is 10:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com