返回列表 上一主題 發帖

[發問] 測試表單內multipage二個page的boolean結果不同

回復 1# dechiuan999
Page2 共宣告 [3個] 新的物件模組
  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   '共宣告 [3個] 新的物件模組
  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
複製代碼
  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
複製代碼
感恩的心......(在麻辣家族討論區.用心學習會有進步的)
但資源無限,後援有限,  一天1元的贊助,人人有能力.

TOP

        靜思自在 : 是非當教育,讚美作警惕。
返回列表 上一主題