Excel doesn't allow comments to be copied

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Hi,
I'm in a big confusion and I need help!

In a VBA application in Excel I wrote some statement like
this:
"fromRange.Copy
toRange.PasteSpecial Paste:=xlPasteComments"
where, as you probably guessed, "fromRange" and "toRange"
are range objects.
Unfortunately, èaste instruction doesn't work. The
comments, defined in "fromRange", aren't copied
into "toRange" as I expect.

Could someone help me to solve this mistery?

Thank you in advance!
Mike
 
Hi, it works for me with this code:

Sub Test()

Dim fromRange, toRange As Range

Set fromRange = ActiveWorkbook.Sheets(1).Range("A1:C1")
Set toRange = ActiveWorkbook.Sheets(2).Range("A1")

fromRange.Copy
toRange.PasteSpecial Paste:=xlPasteComments

End Sub

Best reg.
Erik B


Hi,
I'm in a big confusion and I need help!

In a VBA application in Excel I wrote some statement like
this:
"fromRange.Copy
toRange.PasteSpecial Paste:=xlPasteComments"
where, as you probably guessed, "fromRange" and "toRange"
are range objects.
Unfortunately, èaste instruction doesn't work. The
comments, defined in "fromRange", aren't copied
into "toRange" as I expect.

Could someone help me to solve this mistery?

Thank you in advance!
Mike
 
Thanks Erik!
I agree, is functional also for me in a new workbook.
Still, it doesn't work in that old one.
I don't know, maybe something happened with this last wb.
Or, maybe, there is a setting which can deactivate this or
is a bug of excel ... who can know?
Do you have any ideea, what could gone wrong?
Mike
 
Thanks Erik!
I've got it!!!

In a protected sheet, in an unprotected cell you cannot
copy a comment from another cell (even though destination
cell is UNPROTECTED and you have access to selecting it),
in another sheet. Stupid, isn't it?

Thanks again!
Mike
 

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

Back
Top