Alt alta kayıt hata

Katılım
10 Ocak 2008
Mesajlar
19
Excel Vers. ve Dili
xp tr
Merhaba,

Aşağıdaki koda göre a8 den sonra alt alta kayıt yapması için kodu düzenleyemedim. yardımlarınız ricamla

Private Sub CommandButton1_Click()
If ComboBox1 = "" Then
MsgBox "Onaylanmadı" & vbLf & "İsim Seçmediniz.", vbCritical, " UYARI"
ComboBox1.SetFocus
Exit Sub
End If
If WorksheetFunction.CountIf(ActiveWorkbook.Sheets("SİTE MLZ.LİST").Range("E2:E65536"), ListBox1.List(ListBox1.ListIndex, 0)) And WorksheetFunction.CountIf(ActiveWorkbook.Sheets("SİTE MLZ.LİST").Range("F2:F65536"), ListBox1.List(ListBox1.ListIndex, 2)) And WorksheetFunction.CountIf(ActiveWorkbook.Sheets("SİTE MLZ.LİST").Range("D2:D65536"), ListBox1.List(ListBox1.ListIndex, 3)) > 0 Then
MsgBox "DAHA ÖNCE BU KAYIT YAPILMIŞ.", vbCritical, "UYARI"
ComboBox1 = Empty
ComboBox1.SetFocus
Exit Sub
End If
If MsgBox(ComboBox1 & " Adına" & vbLf & "" & ListBox1.List(ListBox1.ListIndex, 4) & " Tutarındaki" & vbLf & "" & ListBox1.List(ListBox1.ListIndex, 3) & " Adet" & vbLf & "" & ListBox1.List(ListBox1.ListIndex, 2) & " Ürünü" & vbLf & "Kayıt Yapılsın mı ?", vbQuestion + vbYesNo, " BİLGİ") = vbYes Then
Dim Kuman As Long
Kuman = ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(65536, "a").End(xlUp).Row + 1
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(a + 8, 1) = ListBox1.List(ListBox1.ListIndex, 2)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(b + 8, 2) = ListBox1.List(ListBox1.ListIndex, 1)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(c + 8, 3) = ListBox1.List(ListBox1.ListIndex, 0)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(d + 8, 4) = ListBox1.List(ListBox1.ListIndex, 3)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(e + 8, 5) = CDbl(ListBox1.List(ListBox1.ListIndex, 4))
ComboBox1 = Empty
Else
ComboBox1 = Empty
End If
End Sub
 

Orion1

Uzman
Uzman
Katılım
1 Mart 2005
Mesajlar
22,248
Excel Vers. ve Dili
Win7 Home Basic TR 64 Bit

Ofis-2010-TR 32 Bit
en alt satıra yanyana::cool:
Cells için durum şu.Aşağıdaki benim verdiğim örnekler hep a2 hücresine yazar.
satir=2
sutun=1
cells(satir,sutun)="Evren"
yani cells(2,1)="evren"
sütunu sütun başlığı şeklindeede verebilirsiniz.
cells(2,"A").value = "evren"'Buda A2 hücresine yazar
Range("A2")="evren"
Range("A" & satir)="evren"
Bilmem anlatabildimmi.:cool:
Kod:
Kuman = ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(65536, "a").End(xlUp).Row + 1
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman, 1) = ListBox1.List(ListBox1.ListIndex, 2)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman, 2) = ListBox1.List(ListBox1.ListIndex, 1)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman, 3) = ListBox1.List(ListBox1.ListIndex, 0)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman, 4) = ListBox1.List(ListBox1.ListIndex, 3)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman, 5) = CDbl(ListBox1.List(ListBox1.ListIndex, 4))
'Hepsi alt alta
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman, 1) = ListBox1.List(ListBox1.ListIndex, 2)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman+1, 1) = ListBox1.List(ListBox1.ListIndex, 1)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman+2, 1) = ListBox1.List(ListBox1.ListIndex, 0)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman+3, 1) = ListBox1.List(ListBox1.ListIndex, 3)
ActiveWorkbook.Sheets("SİTE MLZ.LİST").Cells(kuman+4, 1) = CDbl(ListBox1.List(ListBox1.ListIndex, 4))
 
Katılım
10 Ocak 2008
Mesajlar
19
Excel Vers. ve Dili
xp tr
Evren Bey,

Özür dilerim sorunumu tam anlatamadım galiba.

Şu anki durum userformdan seçtiğim değeri Sayfa2 de a2 den itibaren alt alta yazmaya devam ediyor.

Benim isteğim sayfa2 den a8 den başlayarak alt alta yazmaya devam etmesidir.

İlgili dosya ek'tedir.
 

Ekli dosyalar

Orion1

Uzman
Uzman
Katılım
1 Mart 2005
Mesajlar
22,248
Excel Vers. ve Dili
Win7 Home Basic TR 64 Bit

Ofis-2010-TR 32 Bit
Evren Bey,

Özür dilerim sorunumu tam anlatamadım galiba.

Şu anki durum userformdan seçtiğim değeri Sayfa2 de a2 den itibaren alt alta yazmaya devam ediyor.

Benim isteğim sayfa2 den a8 den başlayarak alt alta yazmaya devam etmesidir.

İlgili dosya ek'tedir.
Bende anlatamadım galiba .Sorunuzun cevabını 2 numaralı mesajımda verdim.
Yapacağınız işlem sadece o önermeleri dikkate alarak kendi dosyanıza uyarlamak.Eğer bunu yapamazsanız,bundan sonra 5nci satırdan başlayan bir iş için tekrar soru soramayı gerek duyarsanız.Ondan sonra 9ncu ,10ncu satırlarda başlayanlar içinde ayni şeyi yaparsanız.
 

Orion1

Uzman
Uzman
Katılım
1 Mart 2005
Mesajlar
22,248
Excel Vers. ve Dili
Win7 Home Basic TR 64 Bit

Ofis-2010-TR 32 Bit
Dosyanız ektdir.:cool:
 

Ekli dosyalar

Katılım
10 Ocak 2008
Mesajlar
19
Excel Vers. ve Dili
xp tr
teşekkür ederim.
 
Üst