DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_Activate()
For i = 2 To Cells(Rows.Count, 1).End(3).Row
If Cells(i, "A") <> "" Then
Set Hcr = Cells(i, "H")
If ChkVrm(Hcr) Then
Set Check = ActiveSheet.CheckBoxes.Add(Hcr.Left, Hcr.Top, Hcr.Width, Hcr.Height)
Check.Caption = ""
End If
End If
Next
End Sub
Function ChkVrm(Hcr)
ChkVrm = True
For Each ChkBox In ActiveSheet.CheckBoxes
If ChkBox.TopLeftCell.Address = Hcr.Address Then
ChkVrm = False
Exit Function
End If
Next
End Function
Private Sub Worksheet_Activate()
For i = 2 To Cells(Rows.Count, 1).End(3).Row
If Cells(i, "A") <> "" Then
Set Hcr = Cells(i, "H")
If ChkVrm(Hcr) Then
Set Check = ActiveSheet.CheckBoxes.Add(Hcr.Left, Hcr.Top, Hcr.Width, Hcr.Height)
Check.Caption = ""
End If
End If
Next
End Sub
Function ChkVrm(Hcr)
ChkVrm = True
For Each ChkBox In ActiveSheet.CheckBoxes
If ChkBox.TopLeftCell.Address = Hcr.Address Then
ChkVrm = False
Exit Function
End If
Next
End Function
Sub Onaykutusuekle()
Dim kutu As CheckBox
Dim hcr As Range
Dim hcraln As String
Dim bagsut As String
hcraln = InputBox(Prompt:="Onay kutularının yer alacağı alanı belirtiniz. Örnek: A2:A30 gibi...", _
Title:="ONAY KUTUSU ALANI")
bagsut = "D"
With ActiveSheet
For Each hcr In .Range(hcraln).Cells
With hcr
Set kutu = .Parent.CheckBoxes.Add(Top:=.Top, _
Width:=.Width, Left:=.Left, Height:=.Height)
With kutu
.LinkedCell = bagsut & hcr.Row
.Caption = ""
.Name = "checkbox_" & hcr.Address(0, 0)
End With
.NumberFormat = ";;;"
End With
Next hcr
End With
End Sub