Need advise on code

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
2,045
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
VBA Code:
Sub CopyComments()
Dim W As Workbook, W1 As Workbook, Sh As Worksheet, Sh1 As Worksheet
    Set W = Workbooks("Workbook1.xlsx")
    Set W1 = Workbooks("Workbook2.xlsx")
      Set Sh = W.Worksheets("HR&Finance")
      Set Sh1 = W1.Worksheets("Budget")

      Sh.UsedRange.Copy

      W1.Activate: Sh1.Activate
      Sh1.Range("A1").PasteSpecial Paste:=xlPasteComments, Operation:=xlNone, _
                                        SkipBlanks:=False, Transpose:=False
      Application.CutCopyMode = False
End Sub
Found this on line and It may do just what I want - copy a comment from one workbook to another.
But I'm a bit wary - what comment is affected? I don't want to do all just some of them, one at a time.
And do I want SkipBlanks, Transpose etc as shown?
Any help appreciated,
 
You've got it.
Everything on the sheet - YES
Every Note AND Comment - YES
For 1 Note/Comment in 1 Cell - YES specify that Range/Cell as the source
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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