userformda kaydedince iki sheette farklı yerlere kayıt

Katılım
18 Mayıs 2005
Mesajlar
25
Excel Vers. ve Dili
excel2003 Türkçe
Arıza kayıt userformunda yazdıklarım arıza sheetine kaydoluyor.ama ben aynı zamanda bazı bilgileri giriş sheetine kaydetmek te istiyorum.

arıza kayıt userformundaki ;
a)işlem tarihi-
b)kullanılan malzeme adı-
c)parça adedi-
d)teknisyen-

giriş formunda şu karşılıklara yazılacak.
a)işlem tarihi
b)malzeme adı
c)çıkış adedi
d)teslim eden-alan

bunları yapabilirmiyiz .
 

hamitcan

Uzman
Uzman
Katılım
1 Temmuz 2004
Mesajlar
7,737
Excel Vers. ve Dili
Excel 2019 Türkçe
İlgili kodu aşağıdaki ile değiştirin.
Kod:
Private Sub CommandButton8_Click()
For i = 0 To 1
arr = Array("ARIZA", "GİRİŞ")
Sheets(arr(i)).Select

If Range("A2") = "" Then
Range("A2").Select
ActiveCell = 1
ActiveCell.Offset(0, 1).Value = ComboBox2.Value
ActiveCell.Offset(0, 2).Value = TextBox14.Value
ActiveCell.Offset(0, 3).Value = TextBox15.Value
ActiveCell.Offset(0, 4).Value = TextBox16.Value
ActiveCell.Offset(0, 5).Value = TextBox17.Value
ActiveCell.Offset(0, 6).Value = TextBox18.Value
ActiveCell.Offset(0, 7).Value = TextBox19.Value
ActiveCell.Offset(0, 8).Value = DTPicker1.Value
ActiveCell.Offset(0, 9).Value = TextBox21.Value
ActiveCell.Offset(0, 10).Value = TextBox22.Value
ActiveCell.Offset(0, 11).Value = TextBox23.Value
ActiveCell.Offset(0, 12).Value = TextBox24.Value
ActiveCell.Offset(0, 13).Value = TextBox25.Value
ActiveCell.Offset(0, 14).Value = TextBox27.Value
Else
[a65536].End(xlUp).Offset(1, 0).Select
ActiveCell = ActiveCell.Offset(-1, 0) + 1
ActiveCell.Offset(0, 1).Value = ComboBox2.Value
ActiveCell.Offset(0, 2).Value = TextBox14.Value
ActiveCell.Offset(0, 3).Value = TextBox15.Value
ActiveCell.Offset(0, 4).Value = TextBox16.Value
ActiveCell.Offset(0, 5).Value = TextBox17.Value
ActiveCell.Offset(0, 6).Value = TextBox18.Value
ActiveCell.Offset(0, 7).Value = TextBox19.Value
ActiveCell.Offset(0, 8).Value = DTPicker1.Value
ActiveCell.Offset(0, 9).Value = TextBox21.Value
ActiveCell.Offset(0, 10).Value = TextBox22.Value
ActiveCell.Offset(0, 11).Value = TextBox23.Value
ActiveCell.Offset(0, 12).Value = TextBox24.Value
ActiveCell.Offset(0, 13).Value = TextBox25.Value
ActiveCell.Offset(0, 14).Value = TextBox27.Value
End If
Next
ComboBox2 = ""
TextBox14 = ""
TextBox15 = ""
TextBox16 = ""
TextBox17 = ""
TextBox18 = ""
TextBox19 = ""
TextBox21 = ""
TextBox22 = ""
TextBox23 = ""
TextBox24 = ""
TextBox25 = ""
TextBox27 = ""

MsgBox "Veriler Kaydedildi"

End Sub
 
Katılım
18 Mayıs 2005
Mesajlar
25
Excel Vers. ve Dili
excel2003 Türkçe
Hamitcan Bey merhaba
iki sayfaya aynı anda kayıt oldu fakat benim istediğim yerlere kayıt olmadı arıza kayıt sayfasında ne yazarsam giriş sayfasına aynısını kaydediyor daha önceki mesajda da belirttiğim üzere arıza kayıt userformunda kaydete bastığımda tüm bilgileri aynı şekilde arıza sheetine kaydedecek.Ancak ilave olarak Giriş sheetinde b sütununa kullanılan malzeme,d sütununa işlem tarihi,I sütununa teknisyen ve K sütununa parça adedi ni kaydedecek.
yapabilirmiyiz?

kolay gelsin...
 

hamitcan

Uzman
Uzman
Katılım
1 Temmuz 2004
Mesajlar
7,737
Excel Vers. ve Dili
Excel 2019 Türkçe
Kodlarınızı fazla değiştirmemeye çalıştım. Umarım istediğiniz olmuştur.
Kod:
Private Sub CommandButton8_Click()
Sheets("ARIZA").Select
If Range("A2") = "" Then
Range("A2").Select
ActiveCell = 1
ActiveCell.Offset(0, 1).Value = ComboBox2.Value
ActiveCell.Offset(0, 2).Value = TextBox14.Value
ActiveCell.Offset(0, 3).Value = TextBox15.Value
ActiveCell.Offset(0, 4).Value = TextBox16.Value
ActiveCell.Offset(0, 5).Value = TextBox17.Value
ActiveCell.Offset(0, 6).Value = TextBox18.Value
ActiveCell.Offset(0, 7).Value = TextBox19.Value
ActiveCell.Offset(0, 8).Value = DTPicker1.Value
ActiveCell.Offset(0, 9).Value = TextBox21.Value
ActiveCell.Offset(0, 10).Value = TextBox22.Value
ActiveCell.Offset(0, 11).Value = TextBox23.Value
ActiveCell.Offset(0, 12).Value = TextBox24.Value
ActiveCell.Offset(0, 13).Value = TextBox25.Value
ActiveCell.Offset(0, 14).Value = TextBox27.Value
Else
[a65536].End(xlUp).Offset(1, 0).Select
ActiveCell = ActiveCell.Offset(-1, 0) + 1
ActiveCell.Offset(0, 1).Value = ComboBox2.Value
ActiveCell.Offset(0, 2).Value = TextBox14.Value
ActiveCell.Offset(0, 3).Value = TextBox15.Value
ActiveCell.Offset(0, 4).Value = TextBox16.Value
ActiveCell.Offset(0, 5).Value = TextBox17.Value
ActiveCell.Offset(0, 6).Value = TextBox18.Value
ActiveCell.Offset(0, 7).Value = TextBox19.Value
ActiveCell.Offset(0, 8).Value = DTPicker1.Value
ActiveCell.Offset(0, 9).Value = TextBox21.Value
ActiveCell.Offset(0, 10).Value = TextBox22.Value
ActiveCell.Offset(0, 11).Value = TextBox23.Value
ActiveCell.Offset(0, 12).Value = TextBox24.Value
ActiveCell.Offset(0, 13).Value = TextBox25.Value
ActiveCell.Offset(0, 14).Value = TextBox27.Value
End If

Sheets("GİRİŞ").Select
If Range("A2") = "" Then
Range("A2").Select
ActiveCell = 1
ActiveCell.Offset(0, 8).Value = DTPicker1.Value
ActiveCell.Offset(0, 11).Value = TextBox23.Value
ActiveCell.Offset(0, 12).Value = TextBox24.Value
ActiveCell.Offset(0, 14).Value = TextBox27.Value
Else
[a65536].End(xlUp).Offset(1, 0).Select
ActiveCell = ActiveCell.Offset(-1, 0) + 1
ActiveCell.Offset(0, 8).Value = DTPicker1.Value
ActiveCell.Offset(0, 11).Value = TextBox23.Value
ActiveCell.Offset(0, 12).Value = TextBox24.Value
ActiveCell.Offset(0, 14).Value = TextBox27.Value
End If



ComboBox2 = ""
TextBox14 = ""
TextBox15 = ""
TextBox16 = ""
TextBox17 = ""
TextBox18 = ""
TextBox19 = ""
TextBox21 = ""
TextBox22 = ""
TextBox23 = ""
TextBox24 = ""
TextBox25 = ""
TextBox27 = ""

MsgBox "Veriler Kaydedildi"

End Sub
 
Üst