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

[µo°Ý] ¦p¦ó§PÂ_§Ú­è©Ò¥´¤ÄªºCheckBox

¦p¦ó½Æ»sUserForm

§Ú·Q±NUserForm1½Æ»s¨ìUserForm2

TOP

¦]¤£²M·¡³æ¯Â¥þ³¡½Æ»s(®æ¦¡ ª«¥ó  µ{¦¡½X) ÁÙ¬O ³æ¤@³¡¤À  ¬G´£´XÂI«Øij

¤èªk1.  userform1 ¶×¥X«á ¦A¶×¤J.. (name °O±o§ï ÁÙ¦³µ{¦¡½X¤º userform1°O±o§ï2
¤èªk2.  userform1 ½Æ»s«á  userform2¶K¤W  (ª«¥ó¤@¦¸ µ{¦¡½X¤@¦¸)

  ¦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

¦^´_ 10# GBKEE

¦]¬°¥u§ï¥H¤U~µ{¦¡·|¿ù¶Ã!
    Private Sub CheckboxGroup_Click()
    UserForm2.xlText = CheckboxGroup.Caption
    UserForm3.xlText = CheckboxGroup.Caption
    UserForm4.xlText = CheckboxGroup.Caption
    End Sub

¬O§_­n¹ï
xlText ©M CheckboxGroup Åܼƪº«Å§i?

TOP

¦^´_ 13# av8d
­n¤F¸Ñª«¥ó

    test.rar (14.43 KB)

TOP

¦^´_ 14# GBKEE


    ¤j¤j~½Ð°ÝUserForm2.xlTextªº­È¬O?

TOP

¦^´_ 7# GBKEE
Private Sub CommandButton1_Click()
   '»¡©ú UserForm1¤¤ CommednBurron µ{¦¡
   UserForm1.TextBox1 = UserForm1.xlText
End Sub

UserForm1.xlTextªº­È~¥Ø«e§Ú¹ïÀ³¤£¥X¨Ó~½Ð¤j¤j¸Ñ»¡~ÁÂÁÂ!

TOP

¦^´_ 7# GBKEE


    §Ú¦b»¡©ú¸Ô²Ó¤@ÂI~¤j¤j7¼Óªº¥¿¦¡§Ú­nªº»Ý¨D~
¦ý¬O·íUserForm¼W¥[~©Ò¿ï¨úªº³Ì«á¤@­ÓCheckBox«hµLªk«ü¦V¨ì³Ì«á¤@¦¸ÂI¿ïªº~
    Private Sub CheckboxGroup_Click()
    UserForm2.xlText = CheckboxGroup.Caption
    End Sub
¥H¤W¨S°ÝÃD

    Private Sub CheckboxGroup_Click()
    UserForm2.xlText = CheckboxGroup.Caption
    UserForm3.xlText = CheckboxGroup.Caption
    UserForm4.xlText = CheckboxGroup.Caption
    End Sub
¥H¤W¬OUserForm¼W¥[«á~¥X²{¤F°ÝÃD!

TOP

¦^´_ 17# av8d
7#  UserForm1ªºµ{¦¡½X ¬O¨Ì 2# ªºªþÀɭקï
2# ªºªþÀɤ¤aryCBs ÅÜ¼Æ ¬O Module1 ªº¤½¥ÎÅܼÆ
¦p¤µ§A¦³4­ÓUserForm ¬Ò¶·¨p¦³ªº aryCBsÅܼÆ
  1. '4­ÓUserForm ªº µ{¦¡½X
  2. Public xlText As String
  3. Dim aryCBs()  As New cControlArray
  4. Private Sub UserForm_Initialize()
  5. Dim cCBs As Integer
  6. Dim ctl As Control
  7.    cCBs = 0
  8.    For Each ctl In Me.Controls
  9.        If TypeName(ctl) = "CheckBox" Then
  10.            cCBs = cCBs + 1
  11.            ReDim Preserve aryCBs(0 To cCBs)
  12.            Set aryCBs(cCBs).CheckboxGroup = ctl
  13.        End If
  14.    Next ctl
  15. End Sub
½Æ»s¥N½X

TOP

¦^´_ 18# GBKEE
Test.rar ùرz¬O¨Ï¥Î ReDim Preserve aryCBs(1 To cCBs)¡A
¦Ó¦¹³B±z¥Î ReDim Preserve aryCBs(0 To cCBs)
¤@­Ó¬O±q 0 ¶}©l°_ºâ¡A ¥t¤@²Õ¬O±q 1 ¶}©l°_ºâ¡A
¦ý Test.rar  ¤§ aryCBs(1 To  1)  (²Ä¤@¦¸) ´N¦n¹³¨S·N¸q¤F¡H
½Ð¦h«ü±Ð¡I

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-8-14 14:42 ½s¿è

¦^´_ 19# c_c_lai
¤@­Ó¬O±q 0 ¶}©l°_ºâ¡A ¥t¤@²Õ¬O±q 1 ¶}©l°_ºâ¡A¦ý Test.rar  ¤§ aryCBs(1 To  1)  (²Ä¤@¦¸) ´N¦n¹³¨S·N¸q¤F¡H
³o°Ýªº¦n!  ·q¨Ø¤F ¬Ýªº«Ü¥J²Ó
ReDim Preserve aryCBs(1 To cCBs)
ReDim ³¯­z¦¡ ¦bµ{§Ç¼h¦¸¤¤¥Î¨Ó­«·s°t¸m°ÊºA°}¦CÅܼƪºÀx¦sªÅ¶¡¡C
  1. cCBs = cCBs + 1
  2. ReDim Preserve aryCBs(1 To cCBs) ' aryCBs(1  To 1) ¥u¦³¦³1¤¸¯À
½Æ»s¥N½X
  1. cCBs = cCBs + 1
  2. ReDim Preserve aryCBs(0 To cCBs) ' aryCBs(0  To 1) ¦³2¤¸¯À ¦h¤@¤¸¯À      
½Æ»s¥N½X
  1. ReDim Preserve aryCBs(0 To cCBs) ' aryCBs(0  To 0)  ¥u¦³¦³1¤¸¯À
  2. cCBs = cCBs + 1    '¥[¤W1¤¸¯À
½Æ»s¥N½X
  1. ReDim Preserve aryCBs(1 To cCBs) '  aryCBs(1  To 0)    ·|¦³¿ù»~
  2. cCBs = cCBs + 1
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : §g¤l¥ß«í§Ó¡A¤p¤H«í¥ß§Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD