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

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

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

§Ú¦³¤@­Óªí³æ»Ý»s§@,¤º®e¬O®Ú¾Ú§Úµ¹¤©ªº¤å¦r,«ö·Ó¤å¦r¨Ó²£¥Í¦U­Ó®Ö¨ú¤è¶ô.
½d¨Ò¦p¹Ï


¦]¬°§Ú¦³¤W¦Ê¬q»Ý­n³]©w¦¨¬°®Ö¨ú¤è¶ô...¥Ø«e¬O¤@­Ó¤@­Ó¬ÝµÛ¤å¦r«á¿é¤J..«ÜºC...

  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

·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

¦^´_ 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

¦^´_ 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

¦^´_ 5# ML089

  1. Option Explicit
  2. Sub Ex()
  3.     Dim S As Integer, C As Variant
  4.     For Each C In ActiveSheet.OLEObjects   '±±¨î¤u¨ã½cªº±±¨î¶µ (MSForms.CheckBox)
  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.     S = 0
  11.     For Each C In ActiveSheet.CheckBoxes    'ªí³æªº±±¨î¶µ(®Ö¨ú¤è¶ô)
  12.             S = S + IIf(C.Value = 1, 1, 0)
  13.     Next
  14.     MsgBox S
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ ML089 ©ó 2013-9-5 17:31 ½s¿è

¦^´_ 6# GBKEE


    ­ì¨Ó CheckBox »P ®Ö¨ú¤è¶ô¤£¦P¡AÁÂÁ§A¸Ô²Óªº¸Ñ»¡

   ³o¨â­Ó¨Ï¥Î¤W¦³¦ó®t§O?
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 7# ML089
±±¨î¤u¨ã½cªº±±¨î¶µ,¥i¼gVBA

·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

­Y§A·Q¥ÎLinkedCellÄÝ©Ê­pºâ¡A¨º´N¬Oªí³æ¤u¨ãªº®Ö¨ú¤è¶ô¤F¡A¥i§ï¦¨³o¼Ë¡G(¨Ò¦pLinkedCell©ñ¦bmÄæ)
  1. Sub test()
  2.     For Each c In ActiveSheet.Cells.SpecialCells(2)
  3.         Set b = ActiveSheet.CheckBoxes.Add(c(1, 2).Left, c.Top, c.Width, c.Height)
  4.         b.Characters.Text = c.Value
  5.         i = i + 1
  6.         b.LinkedCell = Cells(i, 13).Address
  7.     Next
  8. End Sub
½Æ»s¥N½X

TOP

¦^´_ 9# oobird


    µ²ªG¦p¹Ï¡G

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD