Resolvido
usei o código copiando direto da planilha e está funcionando
Sheets("xml milenium").Select
lin = 2
Do Until Sheets("xml milenium").Cells(lin, 4) = ""
If Sheets("xml milenium").Cells(lin, 33) = "copiado" Then
Else
Sheets("xml milenium").Cells(lin, 2).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(1, 0)
Sheets("xml milenium").Cells(lin, 29).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(0, 3)
Sheets("xml milenium").Cells(lin, 4).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(0, 4)
Sheets("xml milenium").Cells(lin, 14).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(0, 5)
Sheets("xml milenium").Cells(lin, 18).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(0, 6)
Sheets("xml milenium").Cells(lin, 19).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(0, 7)
Sheets("xml milenium").Cells(lin, 30).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(0, 8)
Sheets("xml milenium").Cells(lin, 31).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(0, 9)
Sheets("xml milenium").Cells(lin, 1).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(0, 10)
Sheets("xml milenium").Cells(lin, 34).Value = Date
Sheets("xml milenium").Cells(lin, 34).Copy Destination:=Sheets("planilha milenium").Range("A1048576").End(xlUp).Offset(0, 1)
Sheets("xml milenium").Cells(lin, 33) = "copiado"
End If
lin = lin + 1
Loop
Postado : 24/06/2016 9:56 am