PC Review


Reply
Thread Tools Rate Thread

Add User Name to Comment

 
 
Angeles
Guest
Posts: n/a
 
      29th Nov 2007
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 With Quote
 
 
 
 
Jim Thomlinson
Guest
Posts: n/a
 
      29th Nov 2007
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

 
Reply With Quote
 
john
Guest
Posts: n/a
 
      29th Nov 2007
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

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      29th Nov 2007
This function call...

Environ("UserName")

will return the user name... just concatenate it where you want it to go.

Rick


"Angeles" <(E-Mail Removed)> wrote in message
news:AC3C3D35-77C7-45B9-BE63-(E-Mail Removed)...
> 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 With Quote
 
Angeles
Guest
Posts: n/a
 
      30th Nov 2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
user-comment attribute - how to give user permission to update? Rob Dunn Microsoft Windows 2000 Active Directory 14 8th Jun 2007 02:04 AM
Add User to comment Nimish Microsoft Excel Misc 0 17th Aug 2006 08:41 PM
User in comment box =?Utf-8?B?SmltMjAwMw==?= Microsoft Powerpoint 5 28th Jul 2006 08:42 PM
How to have a 'comment box' on a user form =?Utf-8?B?cHNjaG1pZHQ=?= Microsoft Excel Programming 4 20th Mar 2006 05:10 PM
Removing User name at Comment crapit Microsoft Excel Programming 3 6th Jul 2005 04:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:41 AM.