Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Show username in a cell
How can I get a username to appear in a cell?
Thanks David |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Show username in a cell
With code........change the A1 as desired......
Sub username() Range("A1").Value = ThisWorkbook.BuiltinDocumentProperties("author") End Sub Vaya con Dios, Chuck, CABGx3 "bradasley" wrote: How can I get a username to appear in a cell? Thanks David |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Show username in a cell
To get the user's logon name, use a VBA function like
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _ (ByVal lpBuffer As String, nSize As Long) As Long Function GetLogonName() As String Dim N As Long: N = 255 Dim S As String S = String(N, " ") GetUserName S, N GetLogonName = Left(S, N - 1) End Function You can then call this from a cell with =GetLogonName() -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "bradasley" wrote in message ... How can I get a username to appear in a cell? Thanks David |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Show username in a cell
look here
http://tinyurl.com/qqsm8 or editnamedefinename it whatever you like such as ws in the refers to box type =get.workspace(26)ok then, in a cell, just type in =ws -- Don Guillett SalesAid Software "bradasley" wrote in message ... How can I get a username to appear in a cell? Thanks David |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Show username in a cell
How cool that is Don!!..................a keeper here.
Vaya con Dios, Chuck, CABGx3 "Don Guillett" wrote: look here http://tinyurl.com/qqsm8 or editnamedefinename it whatever you like such as ws in the refers to box type =get.workspace(26)ok then, in a cell, just type in =ws -- Don Guillett SalesAid Software "bradasley" wrote in message ... How can I get a username to appear in a cell? Thanks David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
=IF cell needs to show blank if blank | Excel Discussion (Misc queries) | |||
Want #VALUE! to show as blank cell | Excel Worksheet Functions | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
Problem with IF condition or vector lookup? | Excel Worksheet Functions | |||
cell reference show cell name (ie. D45) and not cell value | Excel Worksheet Functions |