Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ted Collins   on Feb 03 In MS Office Category.

  
Question Answered By: Davi Costa   on Feb 03

Another piece of code you might want to incorporate is this snippit
that checks the domain the user is logged in under:

Sub GetNetworkDomain()
Dim wsh
Set wsh = CreateObject("WScript.Network")
MsgBox wsh.UserDomain
End Sub

Drop that into a module, step into it until wsh is set, then pull up
"wsh" in a watch window to see what other properties are defined in
that object in your environment for more items to check on. I'm not
on a network  (at home at the moment), so I only show my computer's
name in that field. As I recall, when logging in on an network, it
populates with the domain the user logged into.

Share: 

 

This Question has 27 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Restrict workbook to network Or get search suggestion and latest updates.


Tagged: