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

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

  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

¦^´_ 10# GBKEE
ÁÂÁ±zªº»¡©ú¡A¾Ç²ßVBA§Ö¤@¦~¤F¡A¨ì¥Ø«e¬°¤î§Ú´X¥G¨S¨Ï¥Î¹L ActiveX ±±¨î¶µ¡A
Ä´¦p¤U¹Ï©Ò¥Ü¡A§Ú³£¬O¨Ï¥Îªí³æ±±¨î¶µ³B²z¡A¬°¦ó¥i¥H©O¡HÃø¹D¦b¤u§@ªí³æ¤W¤@©w
­n¨Ï¥Î OLEObject ª«¥ó¶Ü¡H

TOP

¦^´_ 11# Hsieh
²×©ó OK ¤F¡AÁÂÁ Hsieh ª©¤jªº¸Ñ´b¡A¦b§PÂ_ xlCheckBox ¤§«e©|»Ý¥ý¦æ¹LÂo Ct ªº«¬ºA¡F
If Ct.Type = msoFormControl Then  ~  End If ¡A§_«h·|²£¥Í¿ù»~°T®§¡C
¦b UserForm ¤º¤§ Ct.Caption ¥ç¦p Hsieh ª©¤jªº½d¨Ò¤@¨Ö¶·­×§ï¦¨ Ct.TextFrame.Characters.Text ¡C
  1. Sub Test2()
  2.     Dim Ct As Shape, mystr As String
  3.       
  4.     For Each Ct In Me.Shapes
  5.         If Ct.Type = msoFormControl Then
  6.             If Ct.FormControlType = xlCheckBox Then
  7.                 If Ct.ControlFormat.Value = 1 Then mystr = IIf(mystr = "", Ct.TextFrame.Characters.Text, mystr & "," & Ct.TextFrame.Characters.Text)
  8.             End If
  9.         End If
  10.     Next

  11.     Sheet1.[B12] = mystr
  12. End Sub
½Æ»s¥N½X
¦A¦¸ÁÂÁ±zµ¥ªº«ü¾É¡I

TOP

¾ã²z¤@¤U , ¦³¿ù½ÐÀ°§Ú«ü¥¿~

ªí³æ¤Wªº±±¨î¶µ :
        ¨Ï¥Î"ªí³æ"ªºControls¹M¾ú ,
        §ä¯S©wÃþ«¬¥ÎTypeNameÀˬd

¤u§@ªí¤WªºactiveX±±¨î¶µ :
        ¨Ï¥Î"¤u§@ªí"ªºOLEObjects¹M¾ú ,
        §ä¯S©wÃþ«¬¥ÎprogIDÀˬd

¤u§@ªí¤Wªºªí³æ±±¨î¶µ :
        ¦b"¤u§@ªí"ªºshapes¤¤ , Type = msoFormControl ªº shape ,
        ±±¨î¶µÄݩʦbshape.ControlFormat¤U ,
        §ä¯S©wÃþ«¬¥Îshape.FormControlTypeÀˬd

TOP

¦^´_ 15# stillfish00
ªþ¤W¹Ïªí¡A§A«K§ó©öÁA¸Ñ¤F¡C

TOP

¦^´_  12#  Hsieh

°õ¦æ¤W¥X²{¿ù»~¡A'438' ¡A ª«¥ó¤£¤ä´©¦¹ÄݩʩΤèªk¡C

TOP

To Hsieh¤j¡G

¤@­Ó«áÄò°ÝÃD¡A´N¬O²{¦b¥i¥H§â­n¿ï¨úªºªF¦è©ñ¦bÀx¦s®æ¤W¡A¨º»ò¦pªG·Q­n¦b³o­ÓÀx¦s®æ¤W¬d¸ß¦³¦h¤Ö­Ó¿ï¨ú¤Fªº¶µ¥Ø¡A§â¥¦Åã¥Ü¦b [B13]¥H¤UªºÀx¦s®æ¡A¨C¤@­Ó¶µ¥Ø ¦û¤@­ÓÀx¦s®æ¡A³o­Ó¥N½X¦p¦ó³B²z¡HÁÂÁ¡I

TOP

¦^´_ 1# maikoyuki

ÁöµM¥Ø«eÁÙ¤£¯à¤U¸ü¨Ó¬Ý¬Ý,¦ýÁÙ¬OÁÂÁ§A

TOP

¦n¸Ô²ÓªºÁ¿¸Ñ¡A¨ü¯q¨}¦h

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD