Changing cell comment default

B

Beemer

Is there a way to make the default for a cell comment property to "move but
don't size with cells"? At present I have to go to properties every time I
add a comment.

Beemer
 
D

Dave Peterson

I don't know a way of changing that default.

Maybe you could just copy and existing comment and edit|paste special|comments.

Or maybe you could use a macro to add the comment:

Option Explicit
Sub testme()
With ActiveCell
If .Comment Is Nothing Then
'do nothing
Else
.ClearComments
End If

.AddComment Text:=Application.UserName & ":" & vbLf

.Comment.Shape.Placement = xlMoveAndSize
End With
SendKeys "%ie~"

End Sub

Or don't worry about that setting when you're adding the comments--just come
back and toggle that setting for all the comments:

Option Explicit
Sub testme2()
Dim cmt As Comment
For Each cmt In ActiveSheet.Comments
cmt.Shape.Placement = xlMoveAndSize
Next cmt
End Sub

But those comments still seem to have a mind of their own.

Debra Dalgleish has sample code for working with comments
(resizing/repositioning):
http://contextures.com/xlcomments03.html
 
B

Beemer

|I don't know a way of changing that default.
|
| Maybe you could just copy and existing comment and edit|paste
special|comments.
|
| Or maybe you could use a macro to add the comment:
|
| Option Explicit
| Sub testme()
| With ActiveCell
| If .Comment Is Nothing Then
| 'do nothing
| Else
| .ClearComments
| End If
|
| .AddComment Text:=Application.UserName & ":" & vbLf
|
| .Comment.Shape.Placement = xlMoveAndSize
| End With
| SendKeys "%ie~"
|
| End Sub
|
| Or don't worry about that setting when you're adding the comments--just
come
| back and toggle that setting for all the comments:
|
| Option Explicit
| Sub testme2()
| Dim cmt As Comment
| For Each cmt In ActiveSheet.Comments
| cmt.Shape.Placement = xlMoveAndSize
| Next cmt
| End Sub
|
| But those comments still seem to have a mind of their own.
|
| Debra Dalgleish has sample code for working with comments
| (resizing/repositioning):
| http://contextures.com/xlcomments03.html
|
|
|
| Beemer wrote:
| >
| > Is there a way to make the default for a cell comment property to "move
but
| > don't size with cells"? At present I have to go to properties every
time I
| > add a comment.
| >
| > Beemer
|
| --
|
| Dave Peterson

Dave,

Thanks for this. My problem is that I have spreadsheets which are say
taking up 6 screen widths. I add comments to many cells. If I
subsequently change column widths or hide columns the next time I open the
spreadsheet all the comments have shot off to the extreme left screen.
Moving these back inot position is a major task so I now have to change the
property each time I add a comment. Is this a bug? Surely MS programmers
should have made the default to move the comment with the cell?

Beemer
 
D

Dave Peterson

If you look at Debra's site, you'll see some code that repositions the comments.

I know that you're not the only person to complain.
 
B

Beemer

| If you look at Debra's site, you'll see some code that repositions the
comments.
|
| I know that you're not the only person to complain.
|
| Beemer wrote:
| >
| > | > |I don't know a way of changing that default.
| > |
| > | Maybe you could just copy and existing comment and edit|paste
| > special|comments.
| > |
| > | Or maybe you could use a macro to add the comment:
| > |
| > | Option Explicit
| > | Sub testme()
| > | With ActiveCell
| > | If .Comment Is Nothing Then
| > | 'do nothing
| > | Else
| > | .ClearComments
| > | End If
| > |
| > | .AddComment Text:=Application.UserName & ":" & vbLf
| > |
| > | .Comment.Shape.Placement = xlMoveAndSize
| > | End With
| > | SendKeys "%ie~"
| > |
| > | End Sub
| > |
| > | Or don't worry about that setting when you're adding the
comments--just
| > come
| > | back and toggle that setting for all the comments:
| > |
| > | Option Explicit
| > | Sub testme2()
| > | Dim cmt As Comment
| > | For Each cmt In ActiveSheet.Comments
| > | cmt.Shape.Placement = xlMoveAndSize
| > | Next cmt
| > | End Sub
| > |
| > | But those comments still seem to have a mind of their own.
| > |
| > | Debra Dalgleish has sample code for working with comments
| > | (resizing/repositioning):
| > | http://contextures.com/xlcomments03.html
| > |
| > |
| > |
| > | Beemer wrote:
| > | >
| > | > Is there a way to make the default for a cell comment property to
"move
| > but
| > | > don't size with cells"? At present I have to go to properties every
| > time I
| > | > add a comment.
| > | >
| > | > Beemer
| > |
| > | --
| > |
| > | Dave Peterson
| >
| > Dave,
| >
| > Thanks for this. My problem is that I have spreadsheets which are say
| > taking up 6 screen widths. I add comments to many cells. If I
| > subsequently change column widths or hide columns the next time I open
the
| > spreadsheet all the comments have shot off to the extreme left screen.
| > Moving these back inot position is a major task so I now have to change
the
| > property each time I add a comment. Is this a bug? Surely MS
programmers
| > should have made the default to move the comment with the cell?
| >
| > Beemer
|
| --
|
| Dave Peterson

Dave, thanks for the link.

Beemer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top