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

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

¦^´_ 4# Hsieh
½Ð°Ý Hsieh ª©¤j¡A ªí³æ±±¨î¶µ¥u¯à³]©w¦b UserForm ¤º¶Ü¡H
  1. Private Sub UserForm_Click()
  2.     Dim Ct As Control, mystr As String
  3.       
  4.     For Each Ct In Me.Controls
  5.         If TypeName(Ct) = "CheckBox" Then
  6.             If Ct.Value = True Then mystr = IIf(mystr = "", Ct.Caption, mystr & "," & Ct.Caption)
  7.         End If
  8.     Next
  9.     Sheet1.[B12] = mystr
  10. End Sub
½Æ»s¥N½X
¦pªG±N¥H¤W»yªkÀ³¥Î¦b ¤u§@ªí³æ Sheet1 ¥»¨­¤ºªº¸Ü¡A ¥L·|¥X²{ "§ä¤£¨ì¤èªk©Î¸ê®Æ¦¨­û"¡A
½Ð±z½ç±Ð¡AÁÂÁ¡I

TOP

¦^´_ 8# Hsieh
§Ú«üªº¬O¡G


ÁÂÁ±z¡I

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

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

TOP

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD