只复制单元格的批注该怎么操作呢?代码如下:
Public Sub 复制单元格批注()
Dim range1 As range
Dim range2 As range
'清除G列
Columns("G:G").Clear
Set range1 = range("A1:B4") '指定要复制的单元格区域
Set range2 = range("G1") '指定要复制的位置(左上角单元格
range1.Copy
range2.PasteSpecial Paste:=xlPasteComments '只复制批注
'回收内存
Set range1 = Nothing
Set range2 = Nothing
End Sub
程序运行前
程序运行后