S.a Arkadaşlar.
Aşağıdaki kodda yapmak istediğim hangi OptionButton seçili ise o satırın en altına kayıt yapsın bu şekliye A-B-ve C sütunlarının altına kayıt yapıyor yani benim belirlediğim sütuna kayıt yapmalı nasıl bir değişiklik yapmalıyım ?
Private Sub CommandButton2_Click()
Sheets("Veri").Select
If OptionButton1.Enabled = True Then
Range("A1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 0).Value = TextBox1.Value
End If
If OptionButton2.Enabled = True Then
Range("B1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 0).Value = TextBox1.Value
End If
If OptionButton3.Enabled = True Then
Range("C1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 0).Value = TextBox1.Value
End If
End Sub
Aşağıdaki kodda yapmak istediğim hangi OptionButton seçili ise o satırın en altına kayıt yapsın bu şekliye A-B-ve C sütunlarının altına kayıt yapıyor yani benim belirlediğim sütuna kayıt yapmalı nasıl bir değişiklik yapmalıyım ?
Private Sub CommandButton2_Click()
Sheets("Veri").Select
If OptionButton1.Enabled = True Then
Range("A1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 0).Value = TextBox1.Value
End If
If OptionButton2.Enabled = True Then
Range("B1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 0).Value = TextBox1.Value
End If
If OptionButton3.Enabled = True Then
Range("C1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 0).Value = TextBox1.Value
End If
End Sub
Ekli dosyalar
Son düzenleme:
