- Katılım
- 12 Eylül 2004
- Mesajlar
- 871
- Excel Vers. ve Dili
-
Excel 2019 Türkçe (Ev)
Excel 2013 Türkçe (Okul)
Kod:
Private Sub CommandButton1_Click()
Dim S1 As Worksheet, X As Byte, Y As Integer, Satir As Long, Sutun As Integer
If TextBox1 = "" Then MsgBox "Lütfen tarih giriniz!", vbCritical: Exit Sub
Set S1 = Sheets("Kazanim_Takip")
Satir = S1.Cells(S1.Rows.Count, 1).End(3).Row + 1
Sutun = 8
For X = 1 To 20
If Me.Controls("CheckBox" & X) = True Then
S1.Cells(Satir, 1) = Satir - 1
If TextBox1.Value <> "" Then S1.Cells(Satir, 2) = CDate(TextBox1.Value)
S1.Cells(Satir, 3) = ComboBox20.Value
S1.Cells(Satir, 4) = Me.Controls("ad" & X).Caption
S1.Cells(Satir, 5) = ComboBox1.Value
S1.Cells(Satir, 6) = ComboBox2.Value
S1.Cells(Satir, 7) = ComboBox3.Value
For Lbl = 1 To 8
a = (Lbl - 1) * 3 + 1: aa = (Lbl - 1) * 3 + 3
If UserForm53.Controls("OptionButton" & a) = False And _
UserForm53.Controls("OptionButton" & a + 1) = False And _
UserForm53.Controls("OptionButton" & a + 2) = False Then
cevap = 0
Else
With UserForm53
If .Controls("OptionButton" & a) = True Then cevap = 1
If .Controls("OptionButton" & a + 1) = True Then cevap = 2
If .Controls("OptionButton" & a + 2) = True Then cevap = 3
End With
End If
S1.Cells(Satir, Sutun) = cevap
Next
Satir = Satir + 1
Sutun = 8
End If
Next
S1.Columns.AutoFit
Set S1 = Nothing
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub
Kod:
Private Sub OptionButton145_Click()
If UserForm53.OptionButton145 = True Then cevap = 1
If UserForm53.OptionButton146 = True Then cevap = 2
If UserForm53.OptionButton147 = True Then cevap = 3
For ss = 1 To 60
With UserForm53
If .Controls("OptionButton" & ss).Enabled = True Then _
.Controls("OptionButton" & ss) = False
End With
Next
For sss = cevap To 60 Step 3
With UserForm53
If .Controls("OptionButton" & sss).Enabled = True Then _
.Controls("OptionButton" & sss) = True
End With
Next
End Sub