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

¦h¿ïCheckBoxªºVBA«ç»ò¼g¡H

¦^´_ 1# maikoyuki
  1. Private Sub CommandButton1_Click()
  2. Dim Ct As OLEObject
  3. For Each Ct In Me.OLEObjects
  4.   If Ct.progID = "Forms.CheckBox.1" Then
  5.    If Ct.Object.Value = True Then mystr = IIf(mystr = "", Ct.Object.Caption, mystr & "," & Ct.Object.Caption)
  6.   End If
  7. Next
  8. [B11] = mystr
  9. End Sub

  10. Private Sub CommandButton2_Click()
  11. For Each Ct In Me.OLEObjects
  12.   If Ct.progID = "Forms.CheckBox.1" Then
  13.    Ct.Object.Value = False
  14.   End If
  15. Next
  16. [B11] = ""
  17. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# stillfish00
¨S¿ù¤£¥]§tªí³æ±±¨î¶µ
¦]¬°¬O¦b¤u§@ªí¤¤«ö¶sªºµ{§Ç¡A©Ò¥HME´N¬O«ü¸Ó¤u§@ªí
progID¥i¿ï¨ú¸Óª«¥ó«á¡A¬Ý½s¿è¦C¤¤ªº¨í¸¹¤º¤å¦r
   
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 7# c_c_lai


    2#µ{¦¡½X¾A¥Î©ó¤u§@ªí¤ºActiveX±±¨î¶µ
½Ðª`·N©Ò¿×ªí³æ±±¨î¶µ¸òActiveX±±¨î¶µªº°Ï§O
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

  1. Sub ex() 'Ū¨ú¤Ä¿ï¤§ªí³æCheckBox±±¨î¶µ
  2. Dim Sp As Shape
  3. For Each Sp In ActiveSheet.Shapes
  4.   If Sp.FormControlType = xlCheckBox Then
  5.   If Sp.ControlFormat.Value = 1 Then mystr = IIf(mystr = "", Sp.TextFrame.Characters.Text, mystr & "," & Sp.TextFrame.Characters.Text)
  6.   End If
  7. Next
  8. MsgBox mystr
  9. End Sub
  10. Sub ex1() '¨ú®ø¤Ä¿ïCheckBox
  11. Dim Sp As Shape
  12. For Each Sp In ActiveSheet.Shapes
  13.   If Sp.FormControlType = xlCheckBox Then
  14.      Sp.ControlFormat.Value = False
  15.   End If
  16. Next
  17. End Sub
½Æ»s¥N½X
¦^´_ 9# c_c_lai
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# maikoyuki
  1. Sub ²M°£±±¨î¶µªº­È()
  2. Dim Ct As OLEObject, k
  3. For Each Ct In Me.OLEObjects
  4.    k = Ct.Object.Value
  5.    Ct.Object.Value = IIf(TypeName(k) = "Boolean", False, IIf(TypeName(k) = "String", "", Null))
  6. Next
  7. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD