- Katılım
- 8 Haziran 2007
- Mesajlar
- 761
- Excel Vers. ve Dili
- excel- 2003 Türkçe
Arkadaşlar dosya boyutu büyük olduğu için örnek ekleyemedim.
Aşağıdıki kod ile form üzerinde sorgu çalıştırıp verileri çağırıyorum.
Private Sub CommandButton1_Click()
Sheets("Personel_Bilgi").Select
If TextBox1.Value = "" Then
MsgBox "Personel No'su Boş Olamaz..!", vbCritical
TextBox1.SetFocus
End If
If TextBox1.Value = "" Then Exit Sub
Set k = Range("B11:Bw65536").Find(TextBox1.Value, , xlValues, xlWhole)
If Not k Is Nothing Then
TextBox2.Value = Cells(k.Row, "D").Value 'ADI
TextBox3.Value = Cells(k.Row, "E").Value 'SOYADI
TextBox4.Value = Cells(k.Row, "F").Value 'DERECE
TextBox5.Value = Cells(k.Row, "G").Value 'KADEME
TextBox6.Value = Cells(k.Row, "H").Value 'DERECE
Else
MsgBox "Aranan Veri Bulunamadı.!"
End If
TextBox1.SetFocus
End Sub
Aynı verileri SpinButton ile görmek istedim. Bu kodu denedim ama olmadı, Yani başka bir çalışma sayfasında vardı uyarlamaya çalıştım da olmadı,.
Private Sub SpinButton1_SpinUp()
Sheets("Personel_Bilgi").Select
If TextBox1.Value = "" Then
MsgBox "Sorgu Çalıştırmak İçin Herhangi Bir Bilgi Giriniz..."
Exit Sub
End If
sat = ActiveCell.Row
For s = (sat + 1) To Range("A65536").End(3).Row
Set bak = Range("b" & s & ":bw" & s).Find(TextBox1.Value, , xlValues, xlWhole)
If bak Is Nothing Then GoTo 5
Cells(s, "a").Select
GoTo 6
5
Next
6
TextBox2.Value = Cells(k.Row, "D").Value 'ADI
TextBox3.Value = Cells(k.Row, "E").Value 'SOYADI
TextBox4.Value = Cells(k.Row, "F").Value 'DERECE
TextBox5.Value = Cells(k.Row, "G").Value 'KADEME
TextBox6.Value = Cells(k.Row, "H").Value 'DERECE
End Sub
bu konuda yardımcı olurmusunuz.
Aşağıdıki kod ile form üzerinde sorgu çalıştırıp verileri çağırıyorum.
Private Sub CommandButton1_Click()
Sheets("Personel_Bilgi").Select
If TextBox1.Value = "" Then
MsgBox "Personel No'su Boş Olamaz..!", vbCritical
TextBox1.SetFocus
End If
If TextBox1.Value = "" Then Exit Sub
Set k = Range("B11:Bw65536").Find(TextBox1.Value, , xlValues, xlWhole)
If Not k Is Nothing Then
TextBox2.Value = Cells(k.Row, "D").Value 'ADI
TextBox3.Value = Cells(k.Row, "E").Value 'SOYADI
TextBox4.Value = Cells(k.Row, "F").Value 'DERECE
TextBox5.Value = Cells(k.Row, "G").Value 'KADEME
TextBox6.Value = Cells(k.Row, "H").Value 'DERECE
Else
MsgBox "Aranan Veri Bulunamadı.!"
End If
TextBox1.SetFocus
End Sub
Aynı verileri SpinButton ile görmek istedim. Bu kodu denedim ama olmadı, Yani başka bir çalışma sayfasında vardı uyarlamaya çalıştım da olmadı,.
Private Sub SpinButton1_SpinUp()
Sheets("Personel_Bilgi").Select
If TextBox1.Value = "" Then
MsgBox "Sorgu Çalıştırmak İçin Herhangi Bir Bilgi Giriniz..."
Exit Sub
End If
sat = ActiveCell.Row
For s = (sat + 1) To Range("A65536").End(3).Row
Set bak = Range("b" & s & ":bw" & s).Find(TextBox1.Value, , xlValues, xlWhole)
If bak Is Nothing Then GoTo 5
Cells(s, "a").Select
GoTo 6
5
Next
6
TextBox2.Value = Cells(k.Row, "D").Value 'ADI
TextBox3.Value = Cells(k.Row, "E").Value 'SOYADI
TextBox4.Value = Cells(k.Row, "F").Value 'DERECE
TextBox5.Value = Cells(k.Row, "G").Value 'KADEME
TextBox6.Value = Cells(k.Row, "H").Value 'DERECE
End Sub
bu konuda yardımcı olurmusunuz.