Textbox veri getirme sorunu

Katılım
27 Aralık 2010
Mesajlar
33
Excel Vers. ve Dili
2007
slm arkadaşlar hayırlı cumalar

forumlarda aşağıdaki kodu buldum ve userform'a ekledim. sayfa4 iken sorunsuz çalışıyor fakat diğer sayfalarda hata veriyor ve çalışmıyor. yardımlarınızı bekliyorum.

Kod:
Private Sub CommandButton5_Click()
Set ara = Sayfa4.Range("B3:B65536").Find(TextBox8, lookat:=xlWhole, LookIn:=xlValues)
If Not ara Is Nothing Then
TextBox1.Text = Cells(ara.Row, "c").Value
TextBox2.Text = Cells(ara.Row, "d").Value
TextBox3.Text = Cells(ara.Row, "i").Value
TextBox4.Text = Cells(ara.Row, "h").Value
TextBox5.Text = Cells(ara.Row, "g").Value
TextBox6.Text = Cells(ara.Row, "f").Value
TextBox7.Text = Cells(ara.Row, "j").Value
ComboBox1.Text = Cells(ara.Row, "k").Value
ComboBox2.Text = Cells(ara.Row, "e").Value
ListBox1.Text = Cells(ara.Row, "l").Value
Else
MsgBox "Aradığınız kayıt bulunamadı!"
End If
End Sub
 
Katılım
31 Ocak 2010
Mesajlar
547
Excel Vers. ve Dili
Excel 2003
slm arkadaşlar hayırlı cumalar

forumlarda aşağıdaki kodu buldum ve userform'a ekledim. sayfa4 iken sorunsuz çalışıyor fakat diğer sayfalarda hata veriyor ve çalışmıyor. yardımlarınızı bekliyorum.

Kod:
Private Sub CommandButton5_Click()
Set ara = [COLOR="#ff0000"]Sayfa4[/COLOR].Range("B3:B65536").Find(TextBox8, lookat:=xlWhole, LookIn:=xlValues)
If Not ara Is Nothing Then
TextBox1.Text = Cells(ara.Row, "c").Value
Merhaba.
Yukarıdaki kırmızı bölümü aşağıdaki gibi (noktaya dikkat ederek) deneyin.

Kod:
ActiveSheet
 
Katılım
27 Aralık 2010
Mesajlar
33
Excel Vers. ve Dili
2007
hocam istediğim gibi olmadı örnek dosyaya bir bakarsanız sevinirim.
 

Ekli dosyalar

Katılım
31 Ocak 2010
Mesajlar
547
Excel Vers. ve Dili
Excel 2003
Merhaba.
Dosyanıza göre sadece 4.sayfada arama yapılacak.
Şöyle deneyin.
Kod:
Private Sub CommandButton5_Click()
Set ara = Sayfa4.Range("B3:B65536").Find(TextBox8, lookat:=xlWhole, LookIn:=xlValues)
If Not ara Is Nothing Then
TextBox1.Text = Sayfa4.Cells(ara.Row, "c").Value
TextBox2.Text = Sayfa4.Cells(ara.Row, "d").Value
TextBox3.Text = Sayfa4.Cells(ara.Row, "i").Value
TextBox4.Text = Sayfa4.Cells(ara.Row, "h").Value
TextBox5.Text = Sayfa4.Cells(ara.Row, "g").Value
TextBox6.Text = Sayfa4.Cells(ara.Row, "f").Value
ComboBox1.Text = Sayfa4.Cells(ara.Row, "k").Value
ComboBox2.Text = Sayfa4.Cells(ara.Row, "e").Value
ListBox1.Text = Sayfa4.Cells(ara.Row, "l").Value
Else
MsgBox "Aradığınız kayıt bulunamadı!"
End If
End Sub
 
Katılım
27 Aralık 2010
Mesajlar
33
Excel Vers. ve Dili
2007
Allah razı olsun hocam çok teşekkür ederim.
 
Üst