- Katılım
- 3 Mart 2006
- Mesajlar
- 28
CommandButton1 ' e atanan aşağıdaki kodların neresine "Aranan veri Bulunamadı" mesajı veren kodu eklemek lazım.Saygılarımla
Private Sub CommandButton1_Click()
ListBox1.Clear
If cbadısoyadı.Text = "" Then Exit Sub
If CheckBox1.Value = True Then look = 1 Else look = 2
If CheckBox3.Value = True Then bas = 1 Else bas = 2
Set c = Range("e:e").Find(cbadısoyadı, LookIn:=xlValues, MatchCase:=CheckBox2.Value, _
LookAt:=look, SearchDirection:=bas)
If Not c Is Nothing Then
firstAddress = c.Address
ListBox1.AddItem
ListBox1.List(0, 0) = c.Address
ListBox1.List(0, 1) = c
basla:
Set c = Range("e:e").FindNext(c)
If Not c Is Nothing And c.Address <> firstAddress Then
a = a + 1
ListBox1.AddItem
ListBox1.List(a, 0) = c.Address
ListBox1.List(a, 1) = c
GoTo basla
End If
End If
If CheckBox4.Value = 0 Then Exit Sub
If ListBox1.ListCount > 0 Then
For X = 0 To ListBox1.ListCount - 2
For Y = X + 1 To ListBox1.ListCount - 1
If Val(Replace(ListBox1.List(X, 0), "$A$", "")) > Val(Replace(ListBox1.List _
(Y, 0), "$A$", "")) Then Call swap(X, Y)
Next Y, X
End If
End Sub
Private Sub CommandButton1_Click()
ListBox1.Clear
If cbadısoyadı.Text = "" Then Exit Sub
If CheckBox1.Value = True Then look = 1 Else look = 2
If CheckBox3.Value = True Then bas = 1 Else bas = 2
Set c = Range("e:e").Find(cbadısoyadı, LookIn:=xlValues, MatchCase:=CheckBox2.Value, _
LookAt:=look, SearchDirection:=bas)
If Not c Is Nothing Then
firstAddress = c.Address
ListBox1.AddItem
ListBox1.List(0, 0) = c.Address
ListBox1.List(0, 1) = c
basla:
Set c = Range("e:e").FindNext(c)
If Not c Is Nothing And c.Address <> firstAddress Then
a = a + 1
ListBox1.AddItem
ListBox1.List(a, 0) = c.Address
ListBox1.List(a, 1) = c
GoTo basla
End If
End If
If CheckBox4.Value = 0 Then Exit Sub
If ListBox1.ListCount > 0 Then
For X = 0 To ListBox1.ListCount - 2
For Y = X + 1 To ListBox1.ListCount - 1
If Val(Replace(ListBox1.List(X, 0), "$A$", "")) > Val(Replace(ListBox1.List _
(Y, 0), "$A$", "")) Then Call swap(X, Y)
Next Y, X
End If
End Sub