View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Still Learning Still Learning is offline
external usenet poster
 
Posts: 31
Default Coping cell comments to another cell

Hey, I just got back to work and your macro worked perfectly. Maybe the
reason was because I did type it instead of coping it.

Can you recomned sites/books that will help me learn the codes for these
macros?

Thanks a whole lot,
Chris

"Rick Rothstein" wrote:

I notice that I did not include the warning message box you mentioned about
the active sheet not having any comments on it; here is my code, modified to
show a message box when there are no comments on the active worksheet...

Sub ShowCommentsNextCell()
Dim C As Comment
If ActiveSheet.Comments.Count 0 Then
Application.ScreenUpdating = False
For Each C In ActiveSheet.Comments
With C.Parent.Offset(, 1)
If .Value = "" Then .Value = C.Text
End With
Next
Application.ScreenUpdating = True
Else
MsgBox "There are no comments on this sheet."
End If
End Sub

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Give this macro a try; it is a little more compact than the one posted on
Debra's website and it operates slightly differently also (no error
checking is required with it)...

Sub ShowCommentsNextCell()
Dim C As Comment
If ActiveSheet.Comments.Count 0 Then
Application.ScreenUpdating = False
For Each C In ActiveSheet.Comments
With C.Parent.Offset(, 1)
If .Value = "" Then .Value = C.Text
End With
Next
Application.ScreenUpdating = True
End If
End Sub

By the way, you should always copy/paste code from newsgroups and/or
websites rather than typing them into the VB code windows (as your
original post indicated you did).

--
Rick (MVP - Excel)


"Still Learning" <Still wrote in
message ...
No it is not. I'm assuming that the macro doesn't need anything typed
into
it (ie ranges (a1:b4) or sheet names or anythng).

Thanks for trying to help.

PS, is there somewhere that lists what these comands do? (as I said, I'm
still learning)

"Joshua Fandango" wrote:

Community Message Not Available