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

[µo°Ý] ½Ð±Ð Ãö©ó µ{¦¡¶}ÀY ªº¬ÛÃöºÃ´b(©Ó±µ CheckBox ®Ö¿ï°ÝÃD)

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-10-19 12:13 ½s¿è

¦^´_ 9# mark15jill
CommandButton2 §ï¬°UserForm_Click (UserForm_Active ¥u¦³ªí³æÅã¥Ü®É¤~¦³ªº  )   ±NLabel1.Caption  Åã¥Ü¥Ø«e®Ö¿ï¤§Checkbox ªº  
¥i¤]¬O¥i¥H ±ø¥ó¬O¤w¦³²£¥Í 10*10 ­Ó Checkbox±±¨î¶µ

ÂI¿ï¥ô¤@ Checkbox ¡A²£¥Í®ÄªG¦p¦P­ì©l CommandButton2 ¤§®ÄªG¬Û¦P
2#  ¨Ï¥Îª«¥óÃþ§O  2# Private Sub CommandButton1_Click() ¦WºÙ §ï¦¨
Private Sub UserForm_Activate()  ©Î¬O Private Sub UserForm_Initialize()  ¬Ò¥i¥H
  1. 'VBA´¡¤J ª«¥óÃþ§O¼Ò²Õ ¦Û°Ê©R¦W¬°Class1 ªºµ{¦¡½X
  2. Option Explicit
  3. Public WithEvents xlCheckbox As MSForms.Checkbox
  4. Private Sub xlcheckbox_Click()
  5.     '    If xlCheckbox = True Then UserForm1.Label1.Caption = "²{¦b®Ö¿ï¡G" & xlCheckbox.Name
  6.     ½Æ¿ï
  7. End Sub
  8. Private Sub ½Æ¿ï()
  9.     Dim xlCcaptionas As String, E As MSForms.Control
  10.     With UserForm1
  11.         For Each E In .Controls
  12.             If InStr(UCase(E.Name), UCase("checkbox")) Then
  13.                 If E.Value = True Then xlCcaptionas = IIf(xlCcaptionas = "", E.Name, xlCcaptionas & "," & E.Name)
  14.             End If
  15.         Next
  16.         If xlCcaptionas <> "" Then
  17.             .Label1.Caption = "²{¦b®Ö¿ï¡G" & xlCcaptionas
  18.         Else
  19.             .Label1.Caption = ""
  20.         End If
  21.     End With
  22. End Sub
½Æ»s¥N½X

TOP

¤j¤j±z¦n
¤p§Ìªºª©¥»2010 ¦ü¥G·|¦³¨Ç°ÝÃD²£¥Í~(¦p CLASS)

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 12# mark15jill
¨£¯º¤F 2010 ©|¥¼ºN¹L
2003 ¦p¹Ï


TOP

¦^´_ 13# GBKEE


    ´ú¸Õ¦¨¥\
·PÁ¤j¤j~
©êºp ¤p§Ì¸ê½è·M¬N~

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

        ÀR«ä¦Û¦b : ¤£­n¤p¬Ý¦Û¤v¡A¦]¬°¤H¦³µL­­ªº¥i¯à¡C
ªð¦^¦Cªí ¤W¤@¥DÃD