+ Reply to Thread
Results 1 to 4 of 4

Win XP Logon Name

  1. #1
    Andy Ives
    Guest

    Win XP Logon Name

    Ayone know how to reference a Win XP network user name from VBA?
    Any pointers to required references etc gratefully received!

    Cheers

    Andy

  2. #2
    Norman Jones
    Guest

    Re: Win XP Logon Name

    Hi Andy.

    Try:

    LName = Environ("UserName")


    ---
    Regards,
    Norman



    "Andy Ives" <[email protected]> wrote in message
    news:[email protected]...
    > Ayone know how to reference a Win XP network user name from VBA?
    > Any pointers to required references etc gratefully received!
    >
    > Cheers
    >
    > Andy




  3. #3
    Andy Ives
    Guest

    Re: Win XP Logon Name

    Thanks norman - works a treat.
    I've just found Application.Username in the Excel Object Model and that
    seems to work too

    Cheers

    Andy

    "Norman Jones" wrote:

    > Hi Andy.
    >
    > Try:
    >
    > LName = Environ("UserName")
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Andy Ives" <[email protected]> wrote in message
    > news:[email protected]...
    > > Ayone know how to reference a Win XP network user name from VBA?
    > > Any pointers to required references etc gratefully received!
    > >
    > > Cheers
    > >
    > > Andy

    >
    >
    >


  4. #4
    Norman Jones
    Guest

    Re: Win XP Logon Name

    Hi Andy,

    > I've just found Application.Username in the Excel Object Model and that
    > seems to work too


    That returns the name inserted in:

    Tools | Options | General | User Name.

    This is the Excel user name and can freely be changed.

    Environ("UserName") returns the Windows logon name.

    ---
    Regards,
    Norman



    "Andy Ives" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks norman - works a treat.
    > I've just found Application.Username in the Excel Object Model and that
    > seems to work too
    >
    > Cheers
    >
    > Andy
    >
    > "Norman Jones" wrote:
    >
    >> Hi Andy.
    >>
    >> Try:
    >>
    >> LName = Environ("UserName")
    >>
    >>
    >> ---
    >> Regards,
    >> Norman
    >>
    >>
    >>
    >> "Andy Ives" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Ayone know how to reference a Win XP network user name from VBA?
    >> > Any pointers to required references etc gratefully received!
    >> >
    >> > Cheers
    >> >
    >> > Andy

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1