Tuesday, December 29, 2009

Excel comments?

Hi.



I'm using Excel, and making a lot of comments (the little red triangle) in cells. It defaults to show the name of the user making the comment - how can I change the default text to include today's date?



Excel comments?

Alt-F11 to open VBA editor, right click icon on left to insert a module, click the module and on the right blank area add the following



Sub auto_open()



With Application



.UserName = "louise " %26amp; _



Format(Now(), "dd-mmm-yy")



End With



End Sub



Then whenever you use this key combination to activate the add comment macro the comment will have your name followed by the date.



Excel comments?

Don't think you can insert the date automatically, at least I've never managed to. However, if you show the comment, then go Insert - Edit Comment, you can f'rinstance delete the name, type in the date, whatever you wish.



Hope this helps.



Excel comments?

I don't think you can, but you could write it on one then copy the comment onto all the other cells you want the comment in (assuming you haven't already done all the comments) - you copy the cell as normal, then click on the cell you want the same comment in and click Edit - Paste Special - Comments. That would save a fair bit of time, but if you've already done all your comments theres nothing I know of that can change them all.



Excel comments?

Go to Tools, Options. In the General tab you'll see, at the bottom a filed called "User name:" Add today's date after your name (if that's the format you'd like).



You'll need to update the date every day that you want to insert this type of comment.



There's probably a vba way to do this automatically, but I'm not sure how.



HTH



Excel comments?

Simply type it in as I dont think insert date works.



Excel comments?

I agree with the person that gave you the macro code, but I'd do it slightly differently. Here's the code I'd use.



Sub auto_open()



With Application



.UserName = "Your Name" %26amp; vbCrLf %26amp; _



Format(Now(), "mm/dd/yyyy")



End With



End Sub



This does two things a little different. The first thing it does different is that it puts the date on the second line. When I tried the one user's code it wanted to wrap the date around because the standard size of the comment was too narrow for it to fit on the first line. So I used the vbCrLf command to enter a carriage return. The second thing I did was reformat the date to the more common US configuration.



There is one thing the user that wrote that code also left out. You need to play the macro for it to take affect. In the Visual Basic Editor screen you will see a button near the top that looks like the play button on a VCR with the little triangle. Make sure you have your cursor somewhere inside that code on that white screen, then hit the play button. That resets the UserName value for Excel. Now every time you insert a comment it will insert your name and that day's current date. You can even close that file and Excel out and restart it and it should still work. Just make sure to replace Your Name with your actual name in the macro code before you play the macro.



Feel free to send me an email if you have any questions.

No comments:

Post a Comment

 
commericial loan