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

excel ²£¥Í¦h­Ó®Ö¨ú¤è¶ô.

¦^´_ 4# GBKEE


½Ð°Ý¥Î2#§@¥X¨Ó ®Ö¨ú¤è¶ô ¥i¥H²Î­p¤Ä¿ï¼Æ¶q

­Y¥Î¤H¤u´¡¤Jªº ®Ö¨ú¤è¶ô ¬°¦óµLªk²Î­p¤Ä¿ï¼Æ¶q¡A»Ý­n¦b³]©w¬Æ»ò
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 3# sworder12
2003ª©¥i¥Î
  1. Option Explicit
  2. Sub Ex()
  3.     Dim S As Integer, C As Variant
  4.     For Each C In ActiveSheet.OLEObjects
  5.         If C.Name Like "CheckBox*" Then
  6.             S = S + IIf(C.Object.Value, 1, 0)
  7.         End If
  8.     Next
  9.     MsgBox S
  10. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

·PÁª©¥D,¦b®a¥Îoffice 2010´ú¸Õ¥¿±`,
¦]¬°§Ú»Ý­n¥Î true/false °µ­p¼Æ¥\¯à.¦ý¤½¥qª©¥»¬Oª©ªº,¤£¹³·sª©ªº¨º»ò¤è«K,¥i¥Hª½±µ«öÄÝ©Ê->LinkedCell


½Ð°Ý¦bª©ªº excel ¦p¦ó¶}±ÒÄÝ©Ê©O¡H¸Õ¤F³\¤[¸Õ¤£¥X¨Ó....:(

TOP

  1. Sub test()
  2.     For Each c In ActiveSheet.Cells.SpecialCells(2)
  3.         Set b = ActiveSheet.OLEObjects.Add(ClassType:="Forms.CheckBox.1", _
  4.                                            Left:=c(1, 2).Left, Top:=c.Top, Width:=c.Width, Height:=c.Height)
  5.         b.Object.Caption = c.Value
  6.     Next
  7. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD