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

[µo°Ý] ¦p¦ó¥i¥H¤@¦¸©Ê§ïVBA userform checkbookªºvalue

[µo°Ý] ¦p¦ó¥i¥H¤@¦¸©Ê§ïVBA userform checkbookªºvalue

§Úuserform¤J­±¦³¤@±Æcheckbox,·Q¥Î¤@­Ócommandbutton,¤@¦¸©Ê±±¨î©Ò¦³checkbook value True©Îfalse,À³¸Ó¦p¦ó¼g¡H

¦^´_ 1# mak
  1. Private Sub CommandButton1_Click()
  2.     For Each x In Me.Controls
  3.         If TypeName(x) = "CheckBox" Then x.value = True
  4.     Next
  5. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_  mak
stillfish00 µoªí©ó 2016-3-23 16:18



­º¥ý·PÁ§AªºÀ°¦£

¦A·Q½Ð±Ð¤@¤U, °²³]§Úªºuserform¤J­±¦³¦h±Æcheckbox, °²³]¬°¤T±Æ, ¨C±Æ¤@¦Ê­Ócheckbox(checkbox1-100, checkbox101-200, checkbox201-300), ¦pªG¤À§O¥Î¤T­Ócommandbutton¥h±±¨î¤T±Æªºcheckbook value, ¥i¥H¦p¦ó¼g¡H

¥t¤@­Ó§Ú·Q³]­pªº¬O²{¦b¦³¤@¦Ê­Ócheckbox(checkbox1-100), ¦Ó®ÇÃ䦳2­Ótextbox¥i¥H¿é¤J1-100¥H¤ºªº¼Æ¦r, ¦A«öcommandbutton, «K¥i¥H¤@¦¸©Ê±±¨î2­Ótextbox¤§¶¡©Ò¦³checkbook value, ³o¼Ë¥i¥H¦p¦ó¼g¡H

TOP

Private Sub CommandButton1_Click()
For i = 1 To 100
¡@¡@UserForm1("CheckBox" & i).Value = 1
Next
End Sub

i ­È¥i¥Î TextBox ­È¥h¶]¡I¡I¡I

TOP

·PÁ¤j®aÀ°¦£

TOP

        ÀR«ä¦Û¦b : ¦³´¼¼z¤~¯à¤À¿ëµ½´c¨¸¥¿¡F¦³Á¾µê¤~¯à«Ø¥ß¬üº¡¤H¥Í¡C
ªð¦^¦Cªí ¤W¤@¥DÃD