Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi , how can I add the current User Name to comment ? I am using the line :
ActiveCell.AddComment ("Item was added on " & Str(Now)) I want to set : ActiveCell.AddComment ("Attribute was added on " & Str(Now) " , it was added by " ) Thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use Environ("username") something like this...
ActiveCell.AddComment ("Attribute was added on " & Str(Now) & _ " , it was added by " environ("username")) -- HTH... Jim Thomlinson "Angeles" wrote: Hi , how can I add the current User Name to comment ? I am using the line : ActiveCell.AddComment ("Item was added on " & Str(Now)) I want to set : ActiveCell.AddComment ("Attribute was added on " & Str(Now) " , it was added by " ) Thank you |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveCell.AddComment "Attribute was added on " & Str(Now) & _
Chr(10) & " it was added by " & Application.UserName should work -- JB "Angeles" wrote: Hi , how can I add the current User Name to comment ? I am using the line : ActiveCell.AddComment ("Item was added on " & Str(Now)) I want to set : ActiveCell.AddComment ("Attribute was added on " & Str(Now) " , it was added by " ) Thank you |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It worked !
Thank you very much :) "john" wrote: ActiveCell.AddComment "Attribute was added on " & Str(Now) & _ Chr(10) & " it was added by " & Application.UserName should work -- JB "Angeles" wrote: Hi , how can I add the current User Name to comment ? I am using the line : ActiveCell.AddComment ("Item was added on " & Str(Now)) I want to set : ActiveCell.AddComment ("Attribute was added on " & Str(Now) " , it was added by " ) Thank you |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This function call...
Environ("UserName") will return the user name... just concatenate it where you want it to go. Rick "Angeles" wrote in message ... Hi , how can I add the current User Name to comment ? I am using the line : ActiveCell.AddComment ("Item was added on " & Str(Now)) I want to set : ActiveCell.AddComment ("Attribute was added on " & Str(Now) " , it was added by " ) Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can you stop user name from appearing in comment? | Setting up and Configuration of Excel | |||
How to rid of User name from Comment Notes? default now | Excel Discussion (Misc queries) | |||
Current date in the comment instead of the user ID | Excel Worksheet Functions | |||
Add User to comment | Excel Discussion (Misc queries) | |||
Removing User name at Comment | Excel Programming |