Merhaba arkadaşlar
Döküman güncelleme sayfasında aşağıdaki kodu yazmaya çalıştım. Amacım combobox1'de döküman numarasını seçtiğimde diğer textboxlara "dok listesi" sayfasında kayıtlı ilgili dökümanın diğer bilgilerini getirmekti. Forumdaki örnekler ise eski olduğu için dosyalarını açamadım. Sizden ricam bu konuda bana yardım etmeniz. Kullandığım kodlar aşağıda, dosyayıda ekte gönderiyorum. İlgilenecek arkadaşlara şimdiden teşekkür ederim.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Intersect(Target, s1.ComboBox1) Is Nothing Then Exit Sub
Set s1 = Sheets("Dok Güncelleme")
Set s2 = Sheets("Dok listesi")
With s2.Range("e4:e10000")
Set bul = .Find(s1.ComboBox1.Value, LookIn:=xlValues, LookAt:=xlWhole)
If Not bul Is Nothing Then
s1.TextBox1.Value = s2.Cells(bul.Row, "b")
s1.TextBox2.Value = s2.Cells(bul.Row, "f")
s1.TextBox3.Value = s2.Cells(bul.Row, "c")
s1.TextBox4.Value = s2.Cells(bul.Row, "d")
s1.TextBox5.Value = s2.Cells(bul.Row, "ı")
s1.TextBox6.Value = s2.Cells(bul.Row, "h")
s1.TextBox7.Value = s2.Cells(bul.Row, "g")
s1.TextBox8.Value = s2.Cells(bul.Row, "j")
Else
MsgBox "Aradığınız Kayıt Bulunamadı", vbInformation, "Bilgi"
s1.ComboBox1.Select
End If
End With
Set bul = Nothing
Set s1 = Nothing
Set s2 = Nothing
End Sub
Döküman güncelleme sayfasında aşağıdaki kodu yazmaya çalıştım. Amacım combobox1'de döküman numarasını seçtiğimde diğer textboxlara "dok listesi" sayfasında kayıtlı ilgili dökümanın diğer bilgilerini getirmekti. Forumdaki örnekler ise eski olduğu için dosyalarını açamadım. Sizden ricam bu konuda bana yardım etmeniz. Kullandığım kodlar aşağıda, dosyayıda ekte gönderiyorum. İlgilenecek arkadaşlara şimdiden teşekkür ederim.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Intersect(Target, s1.ComboBox1) Is Nothing Then Exit Sub
Set s1 = Sheets("Dok Güncelleme")
Set s2 = Sheets("Dok listesi")
With s2.Range("e4:e10000")
Set bul = .Find(s1.ComboBox1.Value, LookIn:=xlValues, LookAt:=xlWhole)
If Not bul Is Nothing Then
s1.TextBox1.Value = s2.Cells(bul.Row, "b")
s1.TextBox2.Value = s2.Cells(bul.Row, "f")
s1.TextBox3.Value = s2.Cells(bul.Row, "c")
s1.TextBox4.Value = s2.Cells(bul.Row, "d")
s1.TextBox5.Value = s2.Cells(bul.Row, "ı")
s1.TextBox6.Value = s2.Cells(bul.Row, "h")
s1.TextBox7.Value = s2.Cells(bul.Row, "g")
s1.TextBox8.Value = s2.Cells(bul.Row, "j")
Else
MsgBox "Aradığınız Kayıt Bulunamadı", vbInformation, "Bilgi"
s1.ComboBox1.Select
End If
End With
Set bul = Nothing
Set s1 = Nothing
Set s2 = Nothing
End Sub
