DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("C2", "B5") ' buraya tıklanacak hücreleri yazınız
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
Call userformac ' makronun adı başka bir şey olabilir.
End If
End Sub
Sub userformac()
Application.ScreenUpdating = False
Set syf = ActiveSheet
sütun = ActiveCell.Column
satır = ActiveCell.Row
sütun1 = 5 ' bu sayılar örnektir, kendiniz seçebilirsiniz
sütun2 = 6 ' bu sayılar örnektir, kendiniz seçebilirsiniz
sütun3 = 7 ' bu sayılar örnektir, kendiniz seçebilirsiniz
'
userform1.textbox1.Value = syf.Cells(satır, sütun1)
userform1.textbox2.Value = syf.Cells(satır, sütun2)
userform1.textbox3.Value = syf.Cells(satır, sütun3)
userform1.Show
End Sub
Tek tıklama yapıldığında excel tablosuna manuel yolla.Yeni kayıtları userform yoluyla mı yapacaksınız.
Örnek Formu ekleyeyimHocam merhaba, gold üyelik olmadığından dosyayı göremiyorum ama benzer durumda şunu yapmıştım, worksheet_selectionChange ile sayfaya bir makro yazıp onu çağırabilirsiniz. İhtiyaca göre verileri değiştirebilirsiniz.
Dim Bul As Range
Private Sub ComboBox1_DropButtonClick()
ComboBox1.RowSource = "Sayfa1!b2:b" & [Sayfa1!b65536].End(3).Row
End Sub
Private Sub ComboBox2_Change()
End Sub
Private Sub CommandButton1_Click()
satır = Range("b500").End(xlUp).Row + 1
Cells(satır, 2).Value = TextBox1.Value
Cells(satır, 3).Value = TextBox2.Value
Cells(satır, 4).Value = ComboBox2.Value
Cells(satır, 5).Value = TextBox4.Value
Cells(satır, "b").Value = WorksheetFunction.Max(Range("b2:b" & Rows.Count)) + 1
End Sub
Private Sub ComboBox1_Click()
On Error Resume Next
Dim c As Range, S1 As Worksheet
Set S1 = Sheets("Sayfa1")
Set c = S1.[b:b].Find(ComboBox1.Value, , xlValues, xlWhole)
If Not c Is Nothing Then
S1.Cells(c.Row, "b").Select
End If
TextBox1.Value = ActiveCell.Offset(0, 1)
TextBox2.Value = ActiveCell.Offset(0, 2)
ComboBox2.Value = ActiveCell.Offset(0, 3)
TextBox4.Value = ActiveCell.Offset(0, 4)
End Sub
Private Sub CommandButton2_Click()
ComboBox1.Value = ""
TextBox1.Value = ""
TextBox2.Value = ""
ComboBox2.Value = ""
TextBox4.Value = ""
End Sub
Private Sub CommandButton3_Click()
ds = ActiveCell.Row
Worksheets("Sayfa1").Cells(ds, 2) = TextBox1.Value
Worksheets("Sayfa1").Cells(ds, 3) = TextBox2.Value
Worksheets("Sayfa1").Cells(ds, 4) = ComboBox2.Value
Worksheets("Sayfa1").Cells(ds, 5) = TextBox4.Value
End Sub
Private Sub CommandButton4_Click()
On Error Resume Next
YesNo = MsgBox("Silme işlemi yapılacak onaylıyor musunuz?", vbYesNo + vbCritical, "Silme Onayı")
Select Case YesNo
Case vbYes
If ComboBox1.Value <> "" Then
Rows(ActiveCell.Row).Delete
Else
MsgBox "Öncelikle Silinecek Veriyi Bulmalısın"
End If
For i = 2 To Sheets("Sayfa1").Cells(Rows.Count, "b").End(xlUp).Row
Cells(i, "b").Value = i - 1
Next
Case vbNo
MsgBox "Silme işlemini iptal ettiniz.", vbMsgBoxSetForeground
End Select
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Label5_Click()
End Sub
Private Sub UserForm_Activate()
UserForm1.ComboBox1.Value = ActiveCell.Offset(0, 1)
UserForm1.TextBox1.Value = ActiveCell.Offset(0, 2)
UserForm1.TextBox2.Value = ActiveCell.Offset(0, 3)
UserForm1.ComboBox2.Value = ActiveCell.Offset(0, 4)
UserForm1.TextBox4.Value = ActiveCell.Offset(0, 5)
End Sub