Format of Comments Box

  • Thread starter Thread starter windsurferLA
  • Start date Start date
W

windsurferLA

I'm using Excel97 under WinXP-pro. (I know it is old, but it does most
everything I want.)

When I go to add a comment to a cell, the first row of the comment box
displays my name probably as a result of my selecting the option when I
installed the software years ago. I tried eliminating my name as the
named user in the tools|options|general, but my names keeps reappearing.

Is there anyway to prevent it from inserting my name in the comment box
short of deleting each time I open a new comment box?
 
Probably not. I just tried (in Excel 2002) deleting my name from the
Username field in Options. I dropped out of Options and when I went back in,
it had my first name there. When I installed Office I put my full name in as
the username (which normally appears in comment boxes), but my Windows user
account is just my first name, so I assume that's where is get's it from. I
tried putting a space in the Username, but still get the colon in the
comment box. There alos doesn't seem to be a way of disabling the automatic
selection of bold type in comments.

Perhaps someone could come up with a macro to automatically delete the name
on creation of a comment, but I wouldn't know where to start with that.
 
Thank you Ian and Dave for prompt reply. Implementing one of the macros
suggested by Dave should solve my problem. I had not considered using a
macro to modify a comment box.

and special thanks to Dave to alerting me to the contextures.com web
site as it looks like it has lots of helpful information.
 
Building on your suggested approach, I created code to insert current
date as a new Comment is entered in Excel'97 worksheet. Seems to work
great. Thanks again.

Sub CommentDating()
'insert current date at beginning of each new comment.
Dim strDate As String
strDate = Now()
strDate = Left(strDate, 8)
Application.UserName = strDate
End Sub

It is combined with auto_close macro to reset things.

Sub auto_close()
Application.UserName = "user"
Beep
Beep
Beep
End Sub

WindsurferLA
 
Question... Using auto_close() I can reset the user name to my user name
with

Sub auto_close()
Application.UserName = "my user name"
End Sub

But when worksheet is opened on another machine by someone else, it
resets the UserName to "my user name" and not their user name.

Is there a simpler way (in Excel'97) to get around this problem other
than saving their user name to a spread sheet with Auto_Open() and then
retrieving their user name with Auto_Close()?

WindsurferLA
 
You can store the username when the workbook opens in a variable that remembers
it. And then when you close the workbook, you can change it back to that
variable.

Option Explicit
Dim myUserName As String
Sub Auto_Open()
myUserName = Application.UserName
Application.UserName = Format(Date, "mm/dd/yy")
End Sub
Sub Auto_Close()
Application.UserName = myUserName
End Sub

In fact, for me (xl2003 and winXP Home), I could use this:

Option Explicit
Sub Auto_Open()
Application.UserName = Format(Date, "mm/dd/yy")
End Sub
Sub Auto_Close()
Application.UserName = ""
End Sub

When I set the application.username to "", the windows logon name was used--I
think!

My windows logon name and application.username are the same, so I couldn't tell
for sure.

You may want to test it a bit.
 
Thanks for help. F.Y.I.
On my WinXP machine running Excel'97,
Application.UserName = "" 'leaves the field blank.

WindsurferLA
 
Thanks for posting back.
Thanks for help. F.Y.I.
On my WinXP machine running Excel'97,
Application.UserName = "" 'leaves the field blank.

WindsurferLA
 
Back
Top