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

[µo°Ý] ½Ð°Ý¦p¦ó­pºâ¤£¦P¤º®eªºCheckbox?

[µo°Ý] ½Ð°Ý¦p¦ó­pºâ¤£¦P¤º®eªºCheckbox?

½Ð°Ý¤j®a¦³ÃöCheckboxªº°ÝÃD¡A

§Ú§Æ±æ¯à°÷¦p¤U¹Ï¡A¤À§O­pºâ¥X"«D±`º¡·N"¡B"º¡·N"¡B"¤£º¡·N"¡B"«Ý§ï¶i"¤À§O³Q¤Ä¿ï¤F´X­Ó?

¥Ø«e¥u¯à¼g¥X©Ò¦³³Q¤Ä¿ïªºCheckbox­Ó¼Æ¡A«oµLªk¨Ì·Ó¦U¤ÀÃþ¥h­pºâ¡Aµ{¦¡½X¤ÎÀɮ׳£ªþ¤W¡A±æ¦U¦ì«e½ú«ü±Ð¡AÁÂÁÂ!
  1. Sub Test()
  2.    
  3.     Dim Ct As OLEObject, iI%
  4.    
  5.     iI = 0
  6.     For Each Ct In Me.OLEObjects
  7.         If Ct.progID = "Forms.CheckBox.1" Then
  8.             If Ct.Object.Value = True Then iI = iI + 1
  9.         End If
  10.     Next
  11.     [B11] = iI
  12.    
  13. End Sub
½Æ»s¥N½X
Checkbox°Ý¨÷­pºâ.rar (22 KB)

¦^´_ 1# jemery127
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Test()
  3.     Dim Ct As OLEObject, M As Variant, Rng As Range
  4.     Set Rng = [a10:A14]  '½Õ¬dªí½d³ò
  5.     Rng.Offset(, 1) = ""
  6.     For Each Ct In Me.OLEObjects
  7.         If Ct.progID = "Forms.CheckBox.1" Then
  8.             M = Application.Match(Ct.Object.Caption, Rng, 0)
  9.             '¤u§@ªí¨ç¼Æ·j´M§¹¥þ¬Û¦Pªº¦r¦êªº¦ì¸m
  10.             If Ct.Object.Value = True And IsNumeric(M) Then
  11.                 Rng(1, 2) = Rng(1, 2) + 1
  12.                 Rng(M, 2) = Rng(M, 2) + 1
  13.             End If
  14.         End If
  15.     Next
  16. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¨C¤ÑµL©Ò¨Æ¨Æ¡A¬O¤H¥Íªº®ø¶OªÌ¡A¿n·¥¡B¦³¥Î¤~¬O¤H¥Íªº³Ð³yªÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD