Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Coping cell comments to another cell

I have been trying to use this macro:
http://www.contextures.com/xlcomment...l#CopyAdjacent
to copy comments into a different cell. I have seen numerious links to this
same macro, but I can't get it to work. I type it into VB just as it is
written, but when I run the macro, I always get the dialog box that says "no
comments found", even though there are comments. Any ideas what I'm doing
wrong?
  #2   Report Post  
Posted to microsoft.public.excel.programming
Member
 
Location: In a hole in the ground there lived Joshua Fandango
Posts: 30
Default Coping cell comments to another cell

Hi SL,

Works fine for me.
Are you sure the cells to the right of the ones containing the
comments are blank?

If you take out the lines:
If mycell.Offset(0, 1).Value = "" Then
&
End If

It should overwrite anything found in the cells to the right - any use
to you?

HtH,
JF

On 25 Dec, 10:17, Still Learning
wrote:
I have been trying to use this macro:http://www.contextures.com/xlcomment...l#CopyAdjacent
to copy comments into a different cell. *I have seen numerious links to this
same macro, but I can't get it to work. *I type it into VB just as it is
written, but when I run the macro, I always get the dialog box that says "no
comments found", even though there are comments. *Any ideas what I'm doing
wrong?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Coping cell comments to another cell

Okay, I took out the lines you said. I still get the no comments found msg.

Here is what I'm doing to test this;
I highlight the cell that has a comment (with the little red triangle) and
select run macro. That's when I get the msg.

I've also tried running the macro on the sheet, it did the same, that's why
I tried just the one cell.

I very new to programming in VB. I would really like to get this to work.

"Joshua Fandango" wrote:

Hi SL,

Works fine for me.
Are you sure the cells to the right of the ones containing the
comments are blank?

If you take out the lines:
If mycell.Offset(0, 1).Value = "" Then
&
End If

It should overwrite anything found in the cells to the right - any use
to you?

HtH,
JF

On 25 Dec, 10:17, Still Learning
wrote:
I have been trying to use this macro:http://www.contextures.com/xlcomment...l#CopyAdjacent
to copy comments into a different cell. I have seen numerious links to this
same macro, but I can't get it to work. I type it into VB just as it is
written, but when I run the macro, I always get the dialog box that says "no
comments found", even though there are comments. Any ideas what I'm doing
wrong?



  #4   Report Post  
Posted to microsoft.public.excel.programming
Member
 
Location: In a hole in the ground there lived Joshua Fandango
Posts: 30
Default Coping cell comments to another cell

Is the worksheet protected?

On 25 Dec, 11:05, Still Learning
wrote:
Okay, I took out the lines you said. *I still get the no comments found msg.

Here is what I'm doing to test this;
I highlight the cell that has a comment (with the little red triangle) and
select run macro. *That's when I get the msg.

I've also tried running the macro on the sheet, it did the same, that's why
I tried just the one cell.

I very new to programming in VB. *I would really like to get this to work.



"Joshua Fandango" wrote:
Hi SL,


Works fine for me.
Are you sure the cells to the right of the ones containing the
comments are blank?


If you take out the lines:
If mycell.Offset(0, 1).Value = "" Then
&
End If


It should overwrite anything found in the cells to the right - any use
to you?


HtH,
JF


On 25 Dec, 10:17, Still Learning
wrote:
I have been trying to use this macro:http://www.contextures.com/xlcomment...l#CopyAdjacent
to copy comments into a different cell. *I have seen numerious links to this
same macro, but I can't get it to work. *I type it into VB just as it is
written, but when I run the macro, I always get the dialog box that says "no
comments found", even though there are comments. *Any ideas what I'm doing
wrong?- Hide quoted text -


- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Coping cell comments to another cell

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
Member
 
Location: In a hole in the ground there lived Joshua Fandango
Posts: 30
Default Coping cell comments to another cell

Hi SL,

You're right, there's no need to specify a range to act on as the code
works on every cell in the active worksheet with a comment in it (or
it is supposed too!)

See if the following will work; you need to highlight the cells
containing comments before running it.

Sub Comment_Text_In_Cell_To_Right()
Dim Cell As Object
On Error Resume Next
For Each Cell In Selection
If Cell.Comment = True Then
Cell.Offset(0, 1) = Cell.Comment.Text
End If
Next Cell
On Error GoTo 0
End Sub


On 25 Dec, 11:35, Still Learning <Still
wrote:
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- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Coping cell comments to another cell

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
coping of cell using dragging the cell downward or rightward Vimlesh Excel Discussion (Misc queries) 1 June 2nd 10 12:04 AM
Coping part of a cell content into a seperate cell Caz H[_2_] Excel Discussion (Misc queries) 3 April 14th 10 04:21 PM
Coping a Coloured cell The Message Excel Worksheet Functions 4 July 16th 09 01:20 PM
coping formulas from one cell to another greg Setting up and Configuration of Excel 2 October 23rd 05 07:29 AM
Coping Values - Not the cell Tim[_14_] Excel Programming 3 August 7th 03 04:02 PM


All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"