Saygilar Yaptigim userform calismasinda excel sayfasindaki 16 siraya kadar kayit yapiyor sonrasi kaydetmiyor acaba hata nerde
[/URL]
[/IMG]
![](http://[URL=http://imageshack.us][IMG]http://img155.imageshack.us/img155/2738/1911um0.png)
![](http://img155.imageshack.us/img155/1911um0.png/1/w1270.png)
Private Sub ComboBox1_Change()
Application.ScreenUpdating = False
If ActiveSheet.AutoFilterMode = False Then [a1:b65536].AutoFilter
[a1:b65536].AutoFilter Field:=1, Criteria1:=ComboBox1
say = WorksheetFunction.Subtotal(102, [a:a])
If say = 1 Then
sat = [a65536].End(3).Row
For a = 3 To 10
Controls("textbox" & a - 2) = Cells(sat, a)
Next
End If
End Sub
Private Sub ComboBox2_Change()
Application.ScreenUpdating = False
If ActiveSheet.AutoFilterMode = False Then [a1:b65536].AutoFilter
[a1:b65536].AutoFilter Field:=2, Criteria1:=ComboBox2
say = WorksheetFunction.Subtotal(102, [a:a])
If say = 1 Then
sat = [a65536].End(3).Row
evn = WorksheetFunction.CountA(Range("A1:IV" & Range("a1").End(xlToRight).Row))
For a = 3 To evn
Controls("textbox" & a - 2) = Cells(sat, a)
Next
End If
End Sub
Private Sub CommandButton1_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = ComboBox1.Value Then
Exit Sub
End If
Next bak
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If bak.Value = ComboBox2.Value Then
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("a1:a65000"))
Cells(say + 1, 1).Value = ComboBox1.Value
Cells(say + 1, 2).Value = ComboBox2.Value
Cells(say + 1, 3).Value = TextBox1.Value
Cells(say + 1, 4).Value = TextBox2.Value
Cells(say + 1, 5).Value = TextBox3.Value
Cells(say + 1, 6).Value = TextBox4.Value
Cells(say + 1, 7).Value = TextBox5.Value
Cells(say + 1, 8).Value = TextBox6.Value
Cells(say + 1, 9).Value = TextBox7.Value
Cells(say + 1, 10).Value = TextBox8.Value
Cells(say + 1, 11).Value = TextBox9.Value
Cells(say + 1, 12).Value = TextBox10.Value
Cells(say + 1, 13).Value = TextBox11.Value
Cells(say + 1, 14).Value = TextBox12.Value
Cells(say + 1, 15).Value = TextBox13.Value
Cells(say + 1, 16).Value = TextBox14.Value
Cells(say + 1, 17).Value = TextBox15.Value
Cells(say + 1, 18).Value = TextBox16.Value
Cells(say + 1, 19).Value = TextBox17.Value
Cells(say + 1, 20).Value = TextBox18.Value
Cells(say + 1, 21).Value = TextBox19.Value
Cells(say + 1, 22).Value = TextBox20.Value
Cells(say + 1, 23).Value = TextBox21.Value
Cells(say + 1, 24).Value = TextBox22.Value
Cells(say + 1, 25).Value = TextBox23.Value
Cells(say + 1, 26).Value = TextBox24.Value
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
End Sub
Private Sub CommandButton2_Click()
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
TextBox11.Value = ""
TextBox12.Value = ""
TextBox13.Value = ""
TextBox14.Value = ""
TextBox15.Value = ""
TextBox16.Value = ""
TextBox17.Value = ""
TextBox18.Value = ""
TextBox19.Value = ""
TextBox20.Value = ""
TextBox21.Value = ""
TextBox22.Value = ""
TextBox23.Value = ""
TextBox24.Value = ""
ComboBox1.SetFocus
ComboBox2.SetFocus
End Sub
Private Sub CommandButton3_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
For a = 1 To 12
ComboBox1.AddItem 2006 + a
ComboBox2.AddItem Format(DateSerial(2007, a, 1), "mmmm")
Next
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
[a1:b65536].AutoFilter
End Sub
Ekli dosyalar
-
84 KB Görüntüleme: 7
Son düzenleme: