Boa noite!!!
Pelo visto você não leu atentamente!!
Onde diz
What if the Database sheet is in another workbook
Sub Copy_To_Another_Workbook()
Dim SourceRange As Range
Dim DestRange As Range
Dim DestWB As Workbook
Dim DestSh As Worksheet
Dim Lr As Long
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
'Change the file name (2*) and the path/file name to your file
If bIsBookOpen_RB("Backup.xls") Then
Set DestWB = Workbooks("Backup.xls")
Else
Set DestWB = Workbooks.Open("C:UsersRontestBackup.xls")
End If
'Change the Source Sheet and range
Set SourceRange = ThisWorkbook.Sheets("Sheet1").Range("A1:K1")
'Change the sheet name of the database workbook
Set DestSh = DestWB.Worksheets("Sheet1")
Lr = LastRow(DestSh)
Set DestRange = DestSh.Range("A" & Lr + 1)
'We make DestRange the same size as SourceRange and use the Value
'property to give DestRange the same values
With SourceRange
Set DestRange = DestRange.Resize(.Rows.Count, .Columns.Count)
End With
DestRange.Value = SourceRange.Value
DestWB.Close savechanges:=True
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 31/10/2014 4:46 pm