• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

textbox yenileme

Katılım
2 Şubat 2016
Mesajlar
71
Excel Vers. ve Dili
2010 türkçe
merhabalar

textbox1 ile x sayfasında B sütünuna değerler veriyorum bu değerler toplamınıda textbox2 de görüntülüyorum

fakat yeni veri eklediğimde textbox2 deki değer yenilenmiyo anca forma çıkış giriş yaptığımda yenileniyo

nası bi kod eklemeliyim
 
Örnek dosya eklerseniz daha iyi olur.
 
kodlar bunlar hocam


Kod:
Private Sub CommandButton89_Click()
Set s1 = Sheets(ComboBox1.Text)
a = s1.Cells(Rows.Count, "A").End(3).Row + 1
s1.Cells(a, "A") = TextBox1.Value
s1.Cells(a, "B") = TextBox2.Value
s1.Cells(a, "C") = TextBox3.Value
s1.Cells(a, "D") = TextBox4.Value

a = WorksheetFunction.Match(ComboBox1.Text, Sheets("LİSTE").Range("B:B"))
TextBox12 = Sheets("LİSTE").Cells(a, "C").Value
TextBox11 = Sheets("LİSTE").Cells(a, "D").Value
TextBox5 = Sheets("LİSTE").Cells(a, "E").Value
TextBox10 = Sheets("LİSTE").Cells(a, "F").Value
TextBox8 = Sheets("LİSTE").Cells(a, "G").Value
 
Sheets("LİSTE") yerine s1. kullanın.:cool:
 
olmadı hocam ya :/ tam olarak kod şöyle

burda 12.11.5.10.8 numaralı textboxların alanlarında değişme olduğunda alanlardada hemen değişiklik göstermesini istiyorum

Kod:
Private Sub ComboBox1_Change()
Sheets(ComboBox1.Text).Select
KAYITYAP.Show
TextBox7 = ".": TextBox7 = ""

a = WorksheetFunction.Match(ComboBox1.Text, Sheets("LİSTE").Range("B:B"))
Set s1 = Sheets(ComboBox1.Text)
TextBox12 = s1.Cells(a, "C").Value
TextBox11 = s1.Cells(a, "D").Value
TextBox5 = s1.Cells(a, "E").Value
TextBox10 = s1.Cells(a, "F").Value
TextBox8 = s1.Cells(a, "G").Value
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
End Sub

Private Sub CommandButton1_Click()

End Sub

Private Sub CommandButton114_Click()
KAYITYAP.Show

Dim sat As Integer
'*****listbox seçili değilse uyar
If ListBox1.ListIndex < 0 Then
MsgBox "Değişecek Alan Seçmelisiniz", vbInformation
Exit Sub: End If
'*****değişecek verileri döngü ile kontrol et
For sat = 2 To Cells(65536, "A").End(xlUp).Row
If Cells(sat, "A") Like ListBox1.Column(0) Then
Sheets(ComboBox1.Text).Cells(sat, "A") = TextBox1.Value
Sheets(ComboBox1.Text).Cells(sat, "B") = TextBox2.Value
Sheets(ComboBox1.Text).Cells(sat, "C") = TextBox3.Value
Sheets(ComboBox1.Text).Cells(sat, "D") = TextBox4.Value

End If: Next
'değişim sonu textleri temizle
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty

'***** listboxu yenile
TextBox7 = ".": TextBox7 = ""

End Sub

Private Sub CommandButton116_Click()
Dim sat As Integer
'*****listbox seçili değilse uyar
If ListBox1.ListIndex < 0 Then
MsgBox "Önce listeden bir isim seçiniz", vbInformation
Exit Sub: End If
On Error Resume Next
    If MsgBox("     " & TextBox1.Text & "       " & "Tarihli Kaydı Silmek İstiyormusunuz?", vbYesNo, "Dikkat") = vbNo Then Exit Sub
'*****silinecek verileri döngü ile kontrol et

Set s1 = Sheets(ComboBox1.Text)
For sat = 2 To s1.Cells(Rows.Count, "A").End(3).Row + 1
If s1.Cells(sat, "b") Like ListBox1.Column(1) Then
s1.Cells(sat, "a").EntireRow.Delete Shift:=xlUp
End If: Next

    KAYITYAP.Show

    MsgBox "SİLME İŞLEMİ YAPILMIŞTIR.", vbInformation

TextBox7 = ".": TextBox7 = ""
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty

End Sub

Private Sub CommandButton22_Click()
Unload UserForm2
UserForm6.Show
End Sub

Private Sub CommandButton28_Click()

End Sub

Private Sub CommandButton4_Click()

End Sub

Private Sub CommandButton6_Click()

End Sub


Private Sub CommandButton85_Click()

End Sub

Private Sub CommandButton89_Click()
Set s1 = Sheets(ComboBox1.Text)
a = s1.Cells(Rows.Count, "A").End(3).Row + 1
s1.Cells(a, "A") = TextBox1.Value
s1.Cells(a, "B") = TextBox2.Value
s1.Cells(a, "C") = TextBox3.Value
s1.Cells(a, "D") = TextBox4.Value
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty

TextBox7 = ".": TextBox7 = ""
End Sub

Private Sub ListBox1_Click()
TextBox1 = ListBox1.Column(0): TextBox2 = ListBox1.Column(1): TextBox3 = ListBox1.Column(2): TextBox4 = ListBox1.Column(3)

End Sub

Private Sub TextBox6_Change()
End Sub

Private Sub TextBox1_Change()

End Sub

Private Sub TextBox10_Change()

End Sub

Private Sub TextBox12_Change()

End Sub

Private Sub TextBox5_Change()

End Sub

Private Sub TextBox7_Change()
Dim sat, s As Integer
Dim deg1, deg2 As String
With ListBox1
.Clear
.ColumnCount = 4
.ColumnWidths = "120;140;60;180"
End With
For sat = 2 To Cells(65536, "A").End(xlUp).Row
deg1 = UCase(Replace(Replace(Cells(sat, "A"), "ı", "I"), "i", "İ"))
deg2 = UCase(Replace(Replace(TextBox7, "ı", "I"), "i", "İ"))
If deg1 Like "*" & deg2 & "*" Then
ListBox1.AddItem
ListBox1.List(s, 0) = Cells(sat, "a")
ListBox1.List(s, 1) = Cells(sat, "B")
ListBox1.List(s, 2) = Cells(sat, "C")
ListBox1.List(s, 3) = Cells(sat, "D")


s = s + 1
End If: Next

End Sub

Private Sub TextBox8_Change()

End Sub


Private Sub UserForm_Initialize()
'***** listboxu yenile
For a = 1 To Sheets.Count
If Sheets(a).Name = "LİSTE" Or Sheets(a).Name = "TAKVİM" Or Sheets(a).Name = "GİRİŞ" Or Sheets(a).Name = "GİRİŞ" Then GoTo 10
ComboBox1.AddItem Sheets(a).Name
10 Next
Sheets("GİRİŞ").Select
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    If CloseMode <> 1 Then Cancel = True

End Sub
 
Aşağıdaki gibi deneyin.:cool:
Kod:
Set s1 = Sheets(ComboBox1.Text)
a = s1.Cells(Rows.Count, "A").End(3).Row + 1
s1.Cells(a, "A") = TextBox1.Value
s1.Cells(a, "B") = TextBox2.Value
s1.Cells(a, "C") = TextBox3.Value
s1.Cells(a, "D") = TextBox4.Value

TextBox12 = s1.Cells(a, "C").Value
TextBox11 = s1.Cells(a, "D").Value
TextBox5 = s1.Cells(a, "E").Value
TextBox10 = s1.Cells(a, "F").Value
TextBox8 = s1.Cells(a, "G").Value
 
Siz veri girerken c-d-e-f sütunlarına veri girmiyorsunuz,ondan diğer textboxlarda verileri göremiyorsunuz.Ayrıca aşağıdaki satırda comboboxa göre değilde textbox2 ye göre arama yapman lazım.:cool:

Kod:
a = WorksheetFunction.Match([B][COLOR="Red"]ComboBox1.Text[/COLOR][/B], Sheets("LİSTE").Range("B:B"))
 
Geri
Üst