- Katılım
- 17 Nisan 2015
- Mesajlar
- 42
- Excel Vers. ve Dili
- 2016 OFFİCE
selamaleyküm. Kodlarımı buraya yazıyorum. veri aktardığım yerdeki dosya açılırken userformda açılıyor. Çünkü aktardığım yerde userform var. Benim kodlarda göreceksiniz workbook.open dediğim için malesef sayfayı açmaya zorluyorum oda gidip haliyle userform.show u başlatıyor. Bu sayfaların açık veya kapalı olmasına göre bir kod yazmalıyım galiba. kodları veriyorum aşağıya...
Private Sub CommandButton6_Click()
Dim listesatiripersonel As Variant
Dim ebtpersonelsonsatir As String
listesatiripersonel = ListBox1.ListIndex + 1
Dim x As Workbook ' Bu kitap
Dim y As Workbook ' Veri aktarma yapacağım kitap
Set x = Workbooks("PERSONEL KAYIT.xlsm")
Set y = Workbooks.Open(Filename:=("C:\Users\ismail\Desktop\uretim_takip\MAKİNELER\EBT_100.xlsm"))
x.Sheets("PERSONEL_KAYIT").Range("A" & listesatiripersonel, "N" & listesatiripersonel).Select
Selection.Copy
ebtpersonelsonsatir = Workbooks("EBT_100.xlsm").Sheets("ebtpersonel").Range("A565536").End(xlUp).Row
y.Sheets("EBTPERSONEL").Range("A" & ebtpersonelsonsatir).Select
Selection.PasteSpecial
y.Save
y.Close
Application.WindowState = xlMaximized
End Sub
Private Sub CommandButton6_Click()
Dim listesatiripersonel As Variant
Dim ebtpersonelsonsatir As String
listesatiripersonel = ListBox1.ListIndex + 1
Dim x As Workbook ' Bu kitap
Dim y As Workbook ' Veri aktarma yapacağım kitap
Set x = Workbooks("PERSONEL KAYIT.xlsm")
Set y = Workbooks.Open(Filename:=("C:\Users\ismail\Desktop\uretim_takip\MAKİNELER\EBT_100.xlsm"))
x.Sheets("PERSONEL_KAYIT").Range("A" & listesatiripersonel, "N" & listesatiripersonel).Select
Selection.Copy
ebtpersonelsonsatir = Workbooks("EBT_100.xlsm").Sheets("ebtpersonel").Range("A565536").End(xlUp).Row
y.Sheets("EBTPERSONEL").Range("A" & ebtpersonelsonsatir).Select
Selection.PasteSpecial
y.Save
y.Close
Application.WindowState = xlMaximized
End Sub
