Çok eski bir web tarayıcısı kullanıyorsunuz. Bu veya diğer siteleri görüntülemekte sorunlar yaşayabilirsiniz.. Tarayıcınızı güncellemeli veya alternatif bir tarayıcı kullanmalısınız.
Hücreye Tıklama ile userforma gelen bilgileri güncelleme
Arkadaşlar Hayırlı akşamlar
VERİ sayfasında isimlere tıkladığımızda userform üzerindeki textboxlara DATA sayfasından bilgi gelmekte Ancak textbox üzerinde bir değişiklik yaptığımda DATA sayfasında güncelleme yapamıyorum.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
On Error GoTo hata
If Intersect(Target, [A:A]) Is Nothing Then Exit Sub
With Target
If .Row < 2 Then Exit Sub
If .Count > 1 Then Exit Sub
If .Value = "" Then Exit Sub
Set c = Sheets("DATA").[A:A].Find(.Value, , xlValues, xlWhole)
If Not c Is Nothing Then
sat = c.Row
UserForm1.Show 0
End If
End With
Cancel = True
hata:
End Sub
Userform1'in kod bölümüne:
Kod:
Dim Sd As Worksheet, Sa As Worksheet
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
CheckBox1.Caption = "ARŞİVLENDİ"
Else
CheckBox1.Caption = "GÜNCEL"
End If
End Sub
Private Sub CommandButton1_Click()
Dim i As Byte
For i = 1 To 5
Sd.Cells(sat, i) = Controls("TextBox" & i)
Next i
Sd.Cells(sat, "B") = CDbl(TextBox2.Text)
Sd.Cells(sat, "E") = CDate(TextBox5.Text)
If CheckBox1.Value = True Then
Sd.OLEObjects("CheckBox" & sat - 1).Object.Value = True
Else
Sd.OLEObjects("CheckBox" & sat - 1).Object.Value = False
End If
End Sub
Private Sub UserForm_Initialize()
Dim i As Byte
Set Sd = Sheets("DATA")
Set Sa = Sheets("ARŞİV")
For i = 1 To 5
Controls("TextBox" & i) = Sd.Cells(sat, i)
Next i
TextBox5.Text = Format(Sd.Cells(sat, "E"), "dd.mm.yyyy")
CheckBox1.Caption = "GÜNCEL"
If Sd.Cells(sat, "F") = "ARŞİVLENDİ" Then
CheckBox1.Caption = "ARŞİVLENDİ"
CheckBox1.Value = True
End If
End Sub
Sizlere daha iyi bir deneyim sunabilmek icin sitemizde çerez konumlandırmaktayız, web sitemizi kullanmaya devam ettiğinizde çerezler ile toplanan kişisel verileriniz Veri Politikamız / Bilgilendirmelerimizde belirtilen amaçlar ve yöntemlerle mevzuatına uygun olarak kullanılacaktır.