yasarcan
Altın Üye
- Katılım
- 30 Nisan 2016
- Mesajlar
- 100
- Excel Vers. ve Dili
- 2007
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
If ChkBoxA1 .Value = True Then
yapacağınız işem
End If
If ChkBoxA1.Value = True Then
Worksheets("sayfa1").Range("f1").Value = "ChkBoxA1 Seçildi"
End If
... sonradan oluşturulan checkbox' ların adları nedir...
Implements CommonCheckBox
'*******************************************************************************************
' Zeki Gürsoy - gursoyzeki@gmail.com
' 28.01.2022
' https://excel.web.tr/threads/userform-uezerinde-cok-sayida-checkbox-olusturma.199300/
'********************************************************************************************
Private col As Collection
Private Sub CommonCheckBox_Change(ctrl As MSForms.IMdcCheckBox)
MsgBox "Selected Checkbox : " & ctrl.Name & vbCrLf & "Value : " & ctrl.Value
End Sub
Private Sub UserForm_Activate()
Set col = New Collection
Dim commonChecks As CommonCheckBox
Dim ctrlCheck As MSForms.CheckBox
For i = 1 To 2
Set ctrlCheck = Me.Controls.Add("Forms.CheckBox.1", "Check" & i, True)
ctrlCheck.Top = i * (ctrlCheck.Height * 0.8)
ctrlCheck.Left = 4
ctrlCheck.Caption = "Check" & i
Set commonChecks = New CommonCheckBox
commonChecks.SetToVariable ctrlCheck, Me
col.Add commonChecks
Next
End Sub
Private WithEvents chk As MSForms.CheckBox
Private m_CallerForm As CommonCheckBox
Public Sub Change(ctrl As MSForms.CheckBox)
' Must Empty..
End Sub
Private Sub chk_Change()
m_CallerForm.Change chk
End Sub
Friend Sub SetToVariable(ctrl As MSForms.CheckBox, callerForm As UserForm)
Set chk = ctrl
Set m_CallerForm = callerForm
End Sub