Kapalı dosyanın son satırından itibaren veri aktarmak istiyorum ama.
"Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
" satırında hata veriyor.
Sub kayıtekler()
yol = "C:\veri\data"
dosyaninadi = "firmalar2.xls"
son = Sheets("sayfam").Cells(65536, "A").End(xlUp).Row
dosya = yol & "\" & dosyaninadi
Range(ActiveCell, "o" & son).Select
Selection.Copy
'Selection.Copy
Set dss = CreateObject("Scripting.FileSystemObject")
a = dss.FileExists(dosya)
If a Then
Set hedef = Workbooks.Open(dosya)
son1 = hedef.Sheets("frm").Cells(65536, "A").End(xlUp).Row + 1
hedef.Sheets("frm").Range("A"&son1).select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.Close SaveChanges:=True
Application.WindowState = xlMaximized
Set hedef = Nothing
Else: MsgBox (" veri dosyası mevcut değil, kayıt dosyalanamadı")
End If
End Sub
"Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
" satırında hata veriyor.
Sub kayıtekler()
yol = "C:\veri\data"
dosyaninadi = "firmalar2.xls"
son = Sheets("sayfam").Cells(65536, "A").End(xlUp).Row
dosya = yol & "\" & dosyaninadi
Range(ActiveCell, "o" & son).Select
Selection.Copy
'Selection.Copy
Set dss = CreateObject("Scripting.FileSystemObject")
a = dss.FileExists(dosya)
If a Then
Set hedef = Workbooks.Open(dosya)
son1 = hedef.Sheets("frm").Cells(65536, "A").End(xlUp).Row + 1
hedef.Sheets("frm").Range("A"&son1).select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.Close SaveChanges:=True
Application.WindowState = xlMaximized
Set hedef = Nothing
Else: MsgBox (" veri dosyası mevcut değil, kayıt dosyalanamadı")
End If
End Sub
