Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
~C
 
Posts: n/a
Default Function that will automatically display the User Name?

I would like an Excel cell to automaticlly populate a cell with the computer
user's name. Is this possible?

Thanks!

~C
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chip Pearson
 
Posts: n/a
Default Function that will automatically display the User Name?

You'd have to use a VBA function.

Function LogonName() As String
LogonName = Environ("username")
End Function

You can then call this from a cell with

=LogonName()

This will return the user's logon name, not the UserName from the
Options dialog box.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"~C" wrote in message
...
I would like an Excel cell to automaticlly populate a cell with
the computer
user's name. Is this possible?

Thanks!

~C



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
~C
 
Posts: n/a
Default Function that will automatically display the User Name?

Chip,

This works, but it does not update on open. Meaning, this:

I am placing this document on our company Share Drive. When anyone else
opens the document, they still see my name, because it is not refreshing on
open. If the user goes to that cell and presses "Enter", it will refresh and
display their name, however, unless I instruct them to do this, it will
continue to show my name. How do I force the spreadsheet to refresh on open?

Thanks,

~C

"Chip Pearson" wrote:

You'd have to use a VBA function.

Function LogonName() As String
LogonName = Environ("username")
End Function

You can then call this from a cell with

=LogonName()

This will return the user's logon name, not the UserName from the
Options dialog box.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"~C" wrote in message
...
I would like an Excel cell to automaticlly populate a cell with
the computer
user's name. Is this possible?

Thanks!

~C




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
user form question: text box to display result BigPig Excel Worksheet Functions 0 February 25th 06 08:17 PM
Function To Dynamically Display File Size MDW Excel Worksheet Functions 1 February 16th 06 09:45 PM
Refreshing a User Defined Function ChrisA Excel Discussion (Misc queries) 1 November 11th 05 06:56 PM
In Excel how can a number automatically display in text form Curtis A Excel Worksheet Functions 2 February 26th 05 11:31 AM
how to move user defined function Grant Excel Worksheet Functions 1 November 17th 04 06:38 PM


All times are GMT +1. The time now is 04:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"