I found this nice little line to do a large text copy from one workbook (or worksheet) to another:
Now I've discovered that I need to copy the comments over as well. Is there a means to do this in one swell foop like the line above or must I do this line by line like this (stolen elsewhere
:
Thanks!
Code:
rngTarget.Resize(rngSource.Rows.Count, rngSource.Columns.Count).Value = rngSource.Value
Now I've discovered that I need to copy the comments over as well. Is there a means to do this in one swell foop like the line above or must I do this line by line like this (stolen elsewhere
Code:
Function GetCommentText(myCell As Range) As String
On Error Resume Next
GetCommentText = myCell.Cells(1, 1).comment.Text
End Function
Option Explicit
Sub Copy1()
Dim Cel As Range
With Worksheets("Sheet2")
.Range("A1:GA10000").ClearFormats
.Range("A1:GA10000").Clear
End With
Sheets("PRODUCTION STATUS").Range("B1:AV104").Copy Sheets("Sheet2").Range("A1")
For Each Cel In Range("a1:cV10000").SpecialCells(xlComments)
Cel.Value = "=getcommenttext(" & Cel.Address & ")"
Next
End Sub
Thanks!