+ Reply to Thread
Results 1 to 2 of 2

Login Name - VBA

  1. #1
    Sri
    Guest

    Login Name - VBA

    Hello,

    I am developing an user interface using VBA in which i want to get the
    Username using VBA and not inputted by the user manually..

    To get this, i thought of using Application.UserName property, but was told
    that it would only give the name to whom the Excel is licensed..i can't bet
    on it...so what i thought was to get the Login Name used to login to the
    System (Windows XP)..

    Whoever logs into tthe system and use this program, that name would be
    automatically used!!!

    Could anybody help me in getting the Login Name using VBA?

    Cheers

    Sri


  2. #2
    Bob Phillips
    Guest

    Re: Login Name - VBA

    Sri,

    You have been told correctly. Use

    sUser = Environ("UserName")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Sri" <[email protected]> wrote in message
    news:[email protected]...
    > Hello,
    >
    > I am developing an user interface using VBA in which i want to get the
    > Username using VBA and not inputted by the user manually..
    >
    > To get this, i thought of using Application.UserName property, but was

    told
    > that it would only give the name to whom the Excel is licensed..i can't

    bet
    > on it...so what i thought was to get the Login Name used to login to the
    > System (Windows XP)..
    >
    > Whoever logs into tthe system and use this program, that name would be
    > automatically used!!!
    >
    > Could anybody help me in getting the Login Name using VBA?
    >
    > Cheers
    >
    > Sri
    >




+ 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