Hello,
I've been able to accomplish the main point of my macro which is to copy a section of code from each file in a folder and paste it into a different workbook. My problem is that when I paste the data, I lose all of the formatting of the data. ie, color, size, alignment
I know that PasteSpecial should accomplish that, but I'm using "destrange". If there is an easy way to convert to PasteSpecial... Otherwise, any ideas on how to make it work with destrange?
Thanks!
My code:
If Fnum > 0 Then
For Fnum = LBound(MyFiles) To UBound(MyFiles)
'Find the last row with data
rnum = LastRow(sh)
'create the destination cell address
Set destrange = sh.Cells(rnum + 2, "A")
' Copy the workbook name in Column E
sh.Cells(rnum + 1, "E").Value = MyPath & MyFiles(Fnum)
'Get the cell values and copy it in the destrange
'Paste the data in the previously established "destrange"
GetData MyPath & MyFiles(Fnum), "SDRL Status Rpt", "A4:G6", destrange, False, False
Next
End If
Display More