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

¬O§_­n¼g30­Ó Private Sub CheckBox*_Change()¤~¥i?

¬O§_­n¼g30­Ó Private Sub CheckBox*_Change()¤~¥i?

½Ð±Ð©ó¦U¦ìªO¥D¤j¤j:
Private Sub CheckBox1_Change()
    ListBox1.Clear
    For i = 1 To 27
        If Controls("CheckBox" & i).Value = True Then
            x = Controls("CheckBox" & i).Caption
            ListBox1.AddItem x
        End If
    Next
End Sub
¥H¤W±¡§Î­Y CheckBox1 ¤§¥~©|¦³CheckBox2 CheckBox3 CheckBox4........Change() ¦@30­Ó
¬O§_­n¼g30­Ó Private Sub CheckBox*_Change()
¥i§_¥t¦³ Loop ¤è¦¡??? ©Î¨ä¥L²¤Æ¤è¦¡
    ÁÂÁ«ü¾É

¦^´_ 1# yangjie
§Q¥Îª«¥óÃþ§O
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh


    ½Ð±ÐHsiehª©¥D:
¥i§_±Ð­Ó½d¨Ò(¦]±q¥¼¼g¹L)

TOP

¥»©«³Ì«á¥Ñ yangjie ©ó 2011-1-29 01:51 ½s¿è

¦^´_ 2# Hsieh


    ½Ð±ÐHsiehª©¥D:
¦Û¤v¹Á¸Õ¬Ý¬Ý
Option Explicit
Dim newcontrol() As New Class1
Private Sub UserForm_Initialize()
  ReDim newcontrol(1 To 27)
    For I = 1 To 27
        Set newcontrol(I).Comd = Controls("CheckBox" & I)
    Next
End Sub
©óÃþ§O¼Ò²Õ¤U
Public WithEvents Comd As MSForms.CommandButton
Private Sub Comd_Click()
    ListBox1.Clear
    For I = 1 To 27
        If Controls("CheckBox" & I).Value = True Then
            x = Controls("CheckBox" & I).Caption
            ListBox1.AddItem x
        End If
    Next
End Sub
¤£ª¾­þ¸Ì¥X®t¿ù???

TOP

¦^´_ 2# Hsieh


ÁÂÁÂHsiehª©¥D:      OK ¤F  °µ¥H¤U­×¥¿´NOK¤F
Option Explicit
Dim newcontrol() As New Class1
Private Sub UserForm_Initialize()
  ReDim newcontrol(1 To 27)
    For I = 1 To 27
        Set newcontrol(I).Comd = Controls("CheckBox" & I)
    Next
End Sub
©óÃþ§O¼Ò²Õ¤U
Public WithEvents Comd As MSForms.CheckBox
Private Sub Comd_Click()
    userform3.ListBox1.Clear
    For I = 1 To 27
        If userform3.Controls("CheckBox" & I).Value = True Then
            x = userform3.Controls("CheckBox" & I).Caption
            userform3.ListBox1.AddItem x
        End If
    Next
End Sub

TOP

¦^´_ 5# yangjie


    ¥ç·PÁÂGBKee ª©¥D´¿¸g«ü¾ÉÃþ§O¼Ò²ÕVBA
«Ü°ª¿³¯à°÷¬ð¯}¦¹ÃøÃD

TOP

¥»©«³Ì«á¥Ñ FAlonso ©ó 2011-1-30 16:34 ½s¿è

¨º­Ómsforms¬O«ç¼Ë¥X¨Óªº? §Úªºvba¨S¦³³o­Ó¿ï¾Ü

¤w¸Ñ¨M..¤u¨ã->³]©w¤Þ¥Î¶µ¥Ø->ÂsÄý->§äwindows\system32\fm20.dll«KOK
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD