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

[µo°Ý] ´ú¸Õªí³æ¤ºmultipage¤G­Ópageªºbooleanµ²ªG¤£¦P

[µo°Ý] ´ú¸Õªí³æ¤ºmultipage¤G­Ópageªºbooleanµ²ªG¤£¦P

¦U¦ì¤j¤j¦n¡G
test1.rar (16.26 KB)
  ¤p§Ì³]¦³¤@MULTIPAGEªí³æ
¨Ã´ú¸Õ¤G­ÓCOMMANDBUTTON«ö¶s
¨Ó´ú¸ÕBOOLEAN¶Ç¦^­È¡C

  ²{¦³PAGE1 ¤Î PAGE2
¡A¦ýPAGE1ªºBOOLEAN­È¦^­È
¥i¶Ç¦^¥¿½TªºTRUE ¤Î FALSE
¦ý¬OPAGE2 ªºBOOLEAN­È¦^­È
«oµLªk¶Ç¦^¥¿½TªºTRUE ¤ÎFALSE
©O¡H

ÁÂÁ¦U¦ì¤j¤j

¦^´_ 1# dechiuan999
Page2 ¦@«Å§i [3­Ó] ·sªºª«¥ó¼Ò²Õ
  1. Private Sub MultiPage1_Change()
  2.     Select Case UserForm1.MultiPage1.Value
  3.     Case Is = 0
  4.     Set Test1 = New clsTest1
  5.     With Test1
  6.         Set .cmd1 = Me.Controls("CommandButton1")
  7.         Set .cmd2 = Me.Controls("CommandButton2")
  8.         Set .cmd6 = Me.Controls("CommandButton6")
  9.         Set .mTxtb1 = Me.Controls("TextBox1")
  10.         .mdTrue = True
  11.     End With
  12.     Case Is = 1
  13.         ReDim Test2(3 To 5)
  14.         For i = 3 To 5
  15.             Set Test2(i) = New clsTest2   '¦@«Å§i [3­Ó] ·sªºª«¥ó¼Ò²Õ
  16.             Set Test2(i).cmd = Me.Controls("CommandButton" & CStr(i))
  17.             Set Test2(i).mTxtb2 = Me.Controls("TextBox2") '
  18.         Next
  19.         Test2(3).mType = 3
  20.         Test2(4).mType = 4
  21.         Test2(5).mType = 5
  22.         Test2(3).mdTrue = True
  23.     End Select
  24.    
  25. End Sub
½Æ»s¥N½X
  1. Private Sub mCmd_Click()
  2.     MsgBox mCmd.Caption & "-" & mTrue
  3.     Select Case ckType
  4.     Case Is = 3
  5.         If mTrue = False Then
  6.         mTrue = True
  7.         Else
  8.             mTrue = False
  9.         End If
  10.         mTxt2 = mTrue
  11.     Case Is = 4
  12.    
  13.     Case Is = 5
  14.         If mTrue = True Then
  15.         mTrue = False
  16.         Else
  17.             mTrue = True
  18.         End If
  19.         mTxt2 = mTrue
  20.     End Select
  21. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE


    ÁÂÁª©¥D¤j¤jªº»¡©ú¡C

¤p§Ì­ì·N¬O·Q²¤Æ¦b
clsTest2¬Ù²¤³]©w
cmd¦¨¤@­Ó¡C«o¤£ª¾¦³
¦p¦¹®t²§¡C

¤p§Ì¬O¦]¨Ï¥Î¤U¦Cªº³]©w
¦@«Å§i [3­Ó] ·sªºª«¥ó¼Ò²Õ
Set Test2(i) = New clsTest2   
¤]¬O¦]¬°³o¡i3­Ó¡j¦U¦Û¿W¥ßªº·sª«¥ó
¼Ò²Õ¤¬¤£¬Û³q¡Aboolean¤~µLªk¦^¶Ç¥¿½T¡C
¤£ª¾¤p§Ìªº§PÂ_¬O§_¬O¹ïªº¶Ü¡H

¤U¦C¬O¤p§Ì­×¥¿¤§«á¡G
Case Is = 1
        Set Test2 = New clsTest2
        With Test2
            Set .cmd3 = Me.Controls("CommandButton3")
            Set .cmd4 = Me.Controls("CommandButton4")
            Set .cmd5 = Me.Controls("CommandButton5")
            Set .mTxtb2 = Me.Controls("TextBox2")
            .mdTrue = True
        End With
        
    End Select
Private Sub mCmd3_Click()
     If mTrue = False Then
        mTrue = True
    Else
        mTrue = False
    End If
        mTxt2 = mTrue
End Sub

Private Sub mCmd5_Click()
    If mTrue = True Then
        mTrue = False
    Else
        mTrue = True
    End If
        mTxt2 = mTrue
End Sub

·P®¦ª©¥D¤j¤j¡I

TOP

        ÀR«ä¦Û¦b : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD