Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Add User Name to Comment

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Add User Name to Comment

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Add User Name to Comment

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Add User Name to Comment

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Add User Name to Comment

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
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
Can you stop user name from appearing in comment? mattcreek Setting up and Configuration of Excel 2 June 7th 09 07:47 PM
How to rid of User name from Comment Notes? default now lbbss Excel Discussion (Misc queries) 1 April 30th 08 01:29 PM
Current date in the comment instead of the user ID Gary[_2_] Excel Worksheet Functions 1 October 22nd 07 11:11 PM
Add User to comment Nimish Excel Discussion (Misc queries) 0 August 17th 06 08:41 PM
Removing User name at Comment crapit Excel Programming 3 July 6th 05 04:20 PM


All times are GMT +1. The time now is 03:06 AM.

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

About Us

"It's about Microsoft Excel"