Simple Macro to Paste Comments Only

datadrvn

Board Regular
Joined
Apr 7, 2005
Messages
86
I'm trying to create a macro to simply paste the cell comments of whatever cell I've just "copied" into to the clipboard to whatever cell I've currently selected.

In Excel 2007, there is a button I can place on the toolbar to Paste-Values but there is no equivelant for Paste-Comments. I'm tired of always having to go through the Paste-Special menu.

The VBA line I've tried is:

Selection.PasteSpecial Paste:=xlPasteComments, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Any help would be appreciated.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi, Glenn...thanks for the speedy reply. I apologize for not being clearer in the original post. The command I'm using doesn't work. I get a "Run Time error '1004': PasteSpecial method of Range Class failed" error.

Wayne
 
Upvote 0
Put a button on the QAT for it, and try again.
 
Upvote 0
What??? Are you kidding me? Wow...now I feel stupid. Yes...it worked. Can you share your thoughts on why? It seems odd that running the macro from the Developer ribbon doesn't work and yet executing the button from the QAT does.

Otherwise...thank you very much. I never would have thought of that. I appreciate your help.

Wayne
 
Upvote 0
Ha ha, glad that worked.

I'd guess that going via the Developer Ribbon Excel clears all buffers before running ... just a guess.

My pleasure! :-D
 
Upvote 0

Forum statistics

Threads
1,224,532
Messages
6,179,388
Members
452,908
Latest member
MTDelphis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top