Consegui
Dim pasta As String
Dim oWkb As Workbook
On Error Resume Next
Set oWkb = Application.Workbooks("FROTA.xlsx")
If Err <> 0 Then
pasta = ThisWorkbook.Path
Workbooks.Open Filename:=pasta & "/FROTA.xlsx"
End If
On Error GoTo 0
Workbooks("FROTA.xlsx").Worksheets("FROTA").Activate
Range("A1").Select
Do While ActiveCell <> ""
ActiveCell.EntireRow.Copy Destination:= _
Workbooks("GF.xlsm").Worksheets("FROTA").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
ActiveCell.Offset(1, 0).Select
Loop
Workbooks("FROTA.xlsx").Close
Se alguem puder melhorar o codigo.
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 02/08/2011 12:25 pm