- Katılım
- 14 Kasım 2004
- Mesajlar
- 297
- Excel Vers. ve Dili
- microsoft office professional plus 2016
Merhaba arkadaşlar...
Excelde 9 sutundan oluşan bir tablom var bu tablomu userform üzerine 1 adet açılır combobox, 1 adet commandbuton ve 8 adet de textbox yaparak aradığımı daha kolay bulayım dedim ve aşağıdaki kodu yazdım. lakin combobox tan isim seçiyorum ve command butona basıyorum fakat bilgiler textbox lara gelmiyor yardımlarınız için teşekkür ederim.
Private Sub CommandButton1_Click()
Sheets("Sayfa1").Select
Range("A1").Select '
If ComboBox1.Value = "" Then
MsgBox "Lütfen bir isim giriniz.", , "İSİM GEREKLİ"
End If
On Error Resume Next
Cells.Find(What:=ComboBox1.Value, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
If ActiveCell.Value <> ComboBox1.Text Then
Dim bak As Range
For Each bak In Range("A2:A" & WorksheetFunction.CountA(Range("A1:A65000")) + 1) 'değiştir
If StrConv(bak.Value, vbUpperCase) = StrConv(TextBox1.Value, vbUpperCase) Then
bak.Select
TextBox1.Value = ActiveCell.Offset(0, 1).Value
TextBox2.Value = ActiveCell.Offset(0, 2).Value
TextBox3.Value = ActiveCell.Offset(0, 3).Value
TextBox4.Value = ActiveCell.Offset(0, 4).Value
TextBox5.Value = ActiveCell.Offset(0, 5).Value
TextBox6.Value = ActiveCell.Offset(0, 6).Value
TextBox7.Value = ActiveCell.Offset(0, 7).Value
TextBox8.Value = ActiveCell.Offset(0, 8).Value
Exit Sub
End If
Next bak
MsgBox "Büyük Harf / Küçük Harfe dikkat ederseniz bu mesajı almazsınız.", , "İŞLEMİNİZ YAPILACAK."
End If
End Sub
Excelde 9 sutundan oluşan bir tablom var bu tablomu userform üzerine 1 adet açılır combobox, 1 adet commandbuton ve 8 adet de textbox yaparak aradığımı daha kolay bulayım dedim ve aşağıdaki kodu yazdım. lakin combobox tan isim seçiyorum ve command butona basıyorum fakat bilgiler textbox lara gelmiyor yardımlarınız için teşekkür ederim.
Private Sub CommandButton1_Click()
Sheets("Sayfa1").Select
Range("A1").Select '
If ComboBox1.Value = "" Then
MsgBox "Lütfen bir isim giriniz.", , "İSİM GEREKLİ"
End If
On Error Resume Next
Cells.Find(What:=ComboBox1.Value, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
If ActiveCell.Value <> ComboBox1.Text Then
Dim bak As Range
For Each bak In Range("A2:A" & WorksheetFunction.CountA(Range("A1:A65000")) + 1) 'değiştir
If StrConv(bak.Value, vbUpperCase) = StrConv(TextBox1.Value, vbUpperCase) Then
bak.Select
TextBox1.Value = ActiveCell.Offset(0, 1).Value
TextBox2.Value = ActiveCell.Offset(0, 2).Value
TextBox3.Value = ActiveCell.Offset(0, 3).Value
TextBox4.Value = ActiveCell.Offset(0, 4).Value
TextBox5.Value = ActiveCell.Offset(0, 5).Value
TextBox6.Value = ActiveCell.Offset(0, 6).Value
TextBox7.Value = ActiveCell.Offset(0, 7).Value
TextBox8.Value = ActiveCell.Offset(0, 8).Value
Exit Sub
End If
Next bak
MsgBox "Büyük Harf / Küçük Harfe dikkat ederseniz bu mesajı almazsınız.", , "İŞLEMİNİZ YAPILACAK."
End If
End Sub