ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó±NCheckbox§ó§ï¦¨OptionButton

[µo°Ý] ¦p¦ó±NCheckbox§ó§ï¦¨OptionButton

  1. Dim cCBs As Integer
  2. Dim ctl As Control
  3.    cCBs = 0
  4.    For Each ctl In Me.Controls
  5.        If TypeName(ctl) = "CheckBox" Then
  6.            cCBs = cCBs + 1
  7.            ReDim Preserve aryCBs(1 To cCBs)
  8.            Set aryCBs(cCBs).CheckboxGroup = ctl
  9.        End If
  10.    Next ctl
½Æ»s¥N½X
  1. Option Explicit
  2. Public WithEvents CheckboxGroup As MSForms.CheckBox
  3. Private Sub CheckboxGroup_Click()
  4.     UserForm2.xlText = CheckboxGroup.Caption
  5.     UserForm3.xlText = CheckboxGroup.Caption
  6. End Sub
½Æ»s¥N½X
  1. Dim ctl As Control
  2.    cCBs = 0
  3.    For Each ctl In Me.Controls
  4.        If TypeName(ctl) = "CheckBox" Then
  5.            cCBs = cCBs + 1
  6.            ReDim Preserve aryCBs(1 To cCBs)
  7.            Set aryCBs(cCBs).CheckboxGroup = ctl
  8.        End If
  9.    Next ctl
½Æ»s¥N½X
  1. Public xlText As String
  2. Dim aryCBs() As New cControlArray
½Æ»s¥N½X
¦A¦¸·PÁ¦U¦ì¦Ñ®v­Ì¡I

        ÀR«ä¦Û¦b : ­n§åµû§O¤H®É¡A¥ý·Q·Q¦Û¤v¬O§_§¹¬üµL¯Ê¡C
ªð¦^¦Cªí ¤W¤@¥DÃD