Show WorkGroup Id or At Leaset Network Id

DaveDmd

New Member
Joined
Feb 4, 2005
Messages
32
I'm trying to set up a security feature that allows users to be able to load up a workbook only if there computer will = the network id or network name that is set up on theire computer. I can figure out how to write the If statement to close the workbook if its false, but i'm having trouble locating a code that will show the network ID that has been set up on the locl computer. If this can't be done i'm willing to use the network id name, but i would prefer to use the local computers network id setting, in case a user has a labtop and wants to bring the workbbok home to use. He would only be able to use the workbook if the network id would match what the VBA has as a setting.
Any one have any ideas would be appreciated.... :pray:
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
ive tried thier codes but still can not find anything that will showm the local network domain name that for example is on my computer. I can get the ip address but the ip address can change wbut the domain name stays the same....
 
Upvote 0
i made a mistake, network name not domain name, i found domain code, but i need to get the network name.... :rolleyes:
 
Upvote 0
See if this gives you any options:

<font face=Tahoma><SPAN style="color:#00007F">Sub</SPAN> env()
    <SPAN style="color:#00007F">Dim</SPAN> EnvString <SPAN style="color:#00007F">As</SPAN> String
    Indx = 1
        <SPAN style="color:#00007F">Do</SPAN>
            EnvString = Environ(Indx)
            Cells(Indx, 1) = EnvString
            Indx = Indx + 1
        <SPAN style="color:#00007F">Loop</SPAN> <SPAN style="color:#00007F">Until</SPAN> EnvString = ""
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

HTH,

Smitty

(Sorry I don't know who to give credit to for it)

Heya Zack!
 
Upvote 0
That is a beautiful code, but i think what i may be looking for will not display due to windows security. perhaps the WorkGroup Name has to be hidden. Ive tried lokking for it everywhere and it does not seem to be anywhere.... :biggrin:
 
Upvote 0
As another thought, is it possible to show local computers network names. in windows explorer i can click on My Network places, then Microsoft windows network and in thier i can see the network i'm connected to. can i show this type of information in excel with vb? :rolleyes:
 
Upvote 0
Yes. But you'd have to know the API call and the Alias to do so. I don't know those particular dll files, or Alias'. If Window's stores it (can remember it) then it can (in most cases) be retreived; not always altered though. You might look at Ivan Moala's site. He has a lot of information regarding API and advanced procedures.
 
Upvote 0

Forum statistics

Threads
1,203,060
Messages
6,053,305
Members
444,651
Latest member
markkuznetsov1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top