+ Reply to Thread
Results 1 to 5 of 5

Formula returning current user name

  1. #1
    TBoeck
    Guest

    Formula returning current user name

    I'd like to find a way to have a cell automatically display the current user
    name as shown in Tools/Options/General/User name.

    Thanks for the help.

  2. #2
    Bob Phillips
    Guest

    Re: Formula returning current user name

    You need a VBA UDF

    Function UserName()
    Username=application.UserName
    End Function


    and then in the worksheet, use
    =UserName()

    --

    HTH

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


    "TBoeck" <[email protected]> wrote in message
    news:[email protected]...
    > I'd like to find a way to have a cell automatically display the current

    user
    > name as shown in Tools/Options/General/User name.
    >
    > Thanks for the help.




  3. #3
    TBoeck
    Guest

    Re: Formula returning current user name

    Bob,

    Thank you for the help. Just one last question (can ya tell I'm new?), what
    is a "VBA UDF"

    "Bob Phillips" wrote:

    > You need a VBA UDF
    >
    > Function UserName()
    > Username=application.UserName
    > End Function
    >
    >
    > and then in the worksheet, use
    > =UserName()
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "TBoeck" <[email protected]> wrote in message
    > news:[email protected]...
    > > I'd like to find a way to have a cell automatically display the current

    > user
    > > name as shown in Tools/Options/General/User name.
    > >
    > > Thanks for the help.

    >
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: Formula returning current user name

    Essentially it is a macro that you can call directly from the worksheet, as
    it it were a function (UDF - User Defined Function). To create it, in Excel
    Alt-F11 will take you into the VBIDE. In the menu, select Insert>Module,
    then just copy that code into there. Then close the VBIDE.

    BTW, you can also get the login name which is a bit more reliable than the
    application name, as the user cannot change it. The VBA for that is

    Function UserName()
    UserName = Environ("UserName")
    End Function

    --

    HTH

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


    "TBoeck" <[email protected]> wrote in message
    news:[email protected]...
    > Bob,
    >
    > Thank you for the help. Just one last question (can ya tell I'm new?),

    what
    > is a "VBA UDF"
    >
    > "Bob Phillips" wrote:
    >
    > > You need a VBA UDF
    > >
    > > Function UserName()
    > > Username=application.UserName
    > > End Function
    > >
    > >
    > > and then in the worksheet, use
    > > =UserName()
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "TBoeck" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I'd like to find a way to have a cell automatically display the

    current
    > > user
    > > > name as shown in Tools/Options/General/User name.
    > > >
    > > > Thanks for the help.

    > >
    > >
    > >




  5. #5
    TBoeck
    Guest

    Re: Formula returning current user name

    Bob,

    I can't thank you enough. My boss will be VERY pleased.

    Tim

    "Bob Phillips" wrote:

    > Essentially it is a macro that you can call directly from the worksheet, as
    > it it were a function (UDF - User Defined Function). To create it, in Excel
    > Alt-F11 will take you into the VBIDE. In the menu, select Insert>Module,
    > then just copy that code into there. Then close the VBIDE.
    >
    > BTW, you can also get the login name which is a bit more reliable than the
    > application name, as the user cannot change it. The VBA for that is
    >
    > Function UserName()
    > UserName = Environ("UserName")
    > End Function
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "TBoeck" <[email protected]> wrote in message
    > news:[email protected]...
    > > Bob,
    > >
    > > Thank you for the help. Just one last question (can ya tell I'm new?),

    > what
    > > is a "VBA UDF"
    > >
    > > "Bob Phillips" wrote:
    > >
    > > > You need a VBA UDF
    > > >
    > > > Function UserName()
    > > > Username=application.UserName
    > > > End Function
    > > >
    > > >
    > > > and then in the worksheet, use
    > > > =UserName()
    > > >
    > > > --
    > > >
    > > > HTH
    > > >
    > > > RP
    > > > (remove nothere from the email address if mailing direct)
    > > >
    > > >
    > > > "TBoeck" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > I'd like to find a way to have a cell automatically display the

    > current
    > > > user
    > > > > name as shown in Tools/Options/General/User name.
    > > > >
    > > > > Thanks for the help.
    > > >
    > > >
    > > >

    >
    >
    >


+ 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