otomatik sıralamayı kaldırma?

Katılım
16 Haziran 2007
Mesajlar
163
Excel Vers. ve Dili
Excel 2003 - Türkçe
merhaba;

userforma girdiğim bilgiler kaydedildikten sonra excel sayfasında otomatik alfabetik sıralama yapılıyor sıralama yapmamsı için aşağıdaki kodu nasıl değiştirmeliyim ...şimdiden teşekkürler...



Private Sub CommandButton1_Click()
On Error Resume Next
Sheets("Prsveri").Select
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
MsgBox "Bu Kayıt numarası bulundu."
Exit Sub
End If
If ComboBox1.Text = "" Then
MsgBox "Lütfen önce isim girin...", , "Kayıt Hatası!!!"
Exit Sub
End If
Next bak
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(ComboBox1.Value, vbUpperCase) Then
MsgBox "Bu isimde bir kaydınız bulundu"
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65500"))
TextBox1.Value = say
Cells(say + 1, 1).Value = TextBox1.Value
Cells(say + 1, 2).Value = ComboBox1.Value
Cells(say + 1, 3).Value = TextBox2.Value
Cells(say + 1, 4).Value = TextBox3.Value
Cells(say + 1, 5).Value = TextBox4.Value
Cells(say + 1, 6).Value = ComboBox5.Value
Cells(say + 1, 7).Value = ComboBox6.Value
Cells(say + 1, 8).Value = TextBox5.Value
Cells(say + 1, 9).Value = TextBox6.Value
Cells(say + 1, 10).Value = TextBox7.Value
Cells(say + 1, 11).Value = TextBox8.Value
Cells(say + 1, 12).Value = TextBox9.Value
Cells(say + 1, 13).Value = TextBox10.Value
Cells(say + 1, 14).Value = TextBox11.Value
Cells(say + 1, 15).Value = TextBox12.Value
Cells(say + 1, 16).Value = TextBox13.Value
Cells(say + 1, 17).Value = TextBox14.Value
Cells(say + 1, 18).Value = TextBox15.Value
Cells(say + 1, 19).Value = TextBox16.Value
Cells(say + 1, 20).Value = TextBox17.Value
Cells(say + 1, 21).Value = TextBox18.Value
Cells(say + 1, 22).Value = TextBox19.Value
Cells(say + 1, 23).Value = ComboBox3.Value
Cells(say + 1, 24).Value = ComboBox4.Value
Cells(say + 1, 25).Value = TextBox20.Value
Cells(say + 1, 26).Value = TextBox21.Value
Cells(say + 1, 27).Value = TextBox22.Value
Cells(say + 1, 28).Value = TextBox23.Value
Cells(say + 1, 29).Value = ComboBox7.Value
Cells(say + 1, 30).Value = ComboBox8.Value
Cells(say + 1, 31).Value = TextBox24.Value
Cells(say + 1, 32).Value = TextBox25.Value
Cells(say + 1, 33).Value = TextBox26.Value
Cells(say + 1, 34).Value = TextBox27.Value
Cells(say + 1, 35).Value = ComboBox9.Value
Cells(say + 1, 36).Value = ComboBox10.Value
Cells(say + 1, 37).Value = TextBox28.Value
Cells(say + 1, 38).Value = TextBox29.Value
Cells(say + 1, 39).Value = TextBox30.Value
Cells(say + 1, 40).Value = TextBox31.Value
Cells(say + 1, 41).Value = ComboBox11.Value
Cells(say + 1, 42).Value = ComboBox12.Value
Cells(say + 1, 43).Value = TextBox32.Value
Cells(say + 1, 44).Value = TextBox33.Value
Cells(say + 1, 45).Value = TextBox34.Value
Cells(say + 1, 46).Value = TextBox35.Value
MsgBox "Yeni Kayıt Başarıyla Yapılmıştır.İyi Çalışmalar Dilerim", vbInformation, "Sn. " & Application.UserName

Range("A2:A65500").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
'************************
Range("B2:AX65500").Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B2").Select '*********
TextBox1.Value = WorksheetFunction.Count(Range("A1:A65500")) + 1
CommandButton5_Click
TextBox50 = Sheets("prsveri").Range("ba2").Value
TextBox51 = Sheets("prsveri").Range("ba3").Value
Combobox2_Change
ComboBox1.SetFocus
End Sub
 

Zeki Gürsoy

Uzman
Uzman
Katılım
31 Aralık 2005
Mesajlar
4,281
Excel Vers. ve Dili
Office 2019 (64 bit) - Türkçe
Bu kısmı silebilirsiniz.
Kod:
Range("A2:A65500").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
'************************
Range("B2:AX65500").Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B2").Select '*********
 
Üst