CheckBox+Buton

Katılım
28 Ağustos 2005
Mesajlar
6
Checkboxları ve butonları kullanarak benim için oldukca onemli bir sorunu cozmem lazım lakin makrolar ve v.basic kodları hakkındaki bilgim henuz cok az. Bana yardımcı olmanızı umud ediyorum...


Umarım baslık cok gayri ciddi olmamıstır.

Ornek dosyada istedigim hususları yazdım.
 
Katılım
29 Eylül 2004
Mesajlar
1,810
Excel Vers. ve Dili
Excel 2002 TR
Daha önceki başlığınız tarafımdan değiştirildi. Aşağıdaki kodları deneyin. (daha önce yazılmış bir iki şey var , onları silip bunları aynen yapıştırabilirsiniz.)


[vb:1:c45f766419]Private Sub CheckBox1_Change()
If Cells(6, 3) = "" Then
Cells(6, 3) = "Ok"
Else
Cells(6, 3) = ""
End If
End Sub
Private Sub CheckBox2_Click()
If Cells(7, 3) = "" Then
Cells(7, 3) = "Ok"
Else
Cells(7, 3) = ""
End If
End Sub
Private Sub CheckBox3_Click()
If Cells(8, 3) = "" Then
Cells(8, 3) = "Ok"
Else
Cells(8, 3) = ""
End If
End Sub
Private Sub CheckBox4_Click()
If Cells(9, 3) = "" Then
Cells(9, 3) = "Ok"
Else
Cells(9, 3) = ""
End If
End Sub

Private Sub CommandButton2_Click()
For i = 1 To 4
If Cells(i + 5, 3) = "Ok" Then
Cells(Cells(65536, 11).End(xlUp).Row + 1, 11) = i & "-" & Cells(i + 5, 5)
End If
Next i
End Sub

Private Sub CommandButton3_Click()
For i = 1 To 4
If Cells(i + 5, 3) = "Ok" Then
Cells(Cells(65536, 12).End(xlUp).Row + 1, 12) = i & "-" & Cells(i + 5, 5)
End If
Next i
End Sub

Private Sub CommandButton5_Click()
CheckBox1.Value = False
CheckBox2.Value = False
CheckBox3.Value = False
CheckBox4.Value = False
Range("C6:C9").ClearContents

End Sub
Private Sub CommandButton1_Click()
For i = 1 To 4
If Cells(i + 5, 3) = "Ok" Then
Cells(Cells(65536, 9).End(xlUp).Row + 1, 9) = i & "-" & Cells(i + 5, 5)
End If
Next i
End Sub
Private Sub CommandButton4_Click()
For i = 1 To 4
If Cells(i + 5, 3) = "Ok" Then
Cells(Cells(65536, 10).End(xlUp).Row + 1, 10) = i & "-" & Cells(i + 5, 5)
End If
Next i
End Sub[/vb:1:c45f766419]
 
Üst