Consulting

Results 1 to 3 of 3

Thread: Solved: When Application.UserName is blank ...

  1. #1
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location

    Solved: When Application.UserName is blank ...

    I am helping a small company with a few office automation issues. When I have wanted to control who gets to do certain things in the past, I used Application.Username and compared it to a list of user name privledges. Unfortunately this company has decided that all applications will be loaded with no username (makes it easier to move systems around). So, that method is out.

    How do I fetch the logon username?

    Thanks
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master xld's Avatar
    Joined
    Apr 2005
    Posts
    25,149
    Location
    Use

    [vba]
    Environ("UserName")
    [/vba]

    it gets the logon name, they have to have one of those.

  3. #3
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    Quote Originally Posted by xld
    Use

    [vba]
    Environ("UserName")
    [/vba]
    it gets the logon name, they have to have one of those.
    Thanks, that works well.
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •