返回列表 上一主題 發帖

[發問] 點選LISTBOX_CLICK一項資料時為何會執行四次呢?

回復 1# dechiuan999
  1.      myOp11.mySqlServer.clsConn = conStr
複製代碼
感恩的心......(在麻辣家族討論區.用心學習會有進步的)
但資源無限,後援有限,  一天1元的贊助,人人有能力.

TOP

回復 1# dechiuan999
  1. Private Sub MultiPage1_Change()
  2.     Select Case MultiPage1.Value
  3.     'MultiPage1.Value = 0
  4.     Case Is = 3
  5.         mSht1.Cells.Clear
  6.         mSht2.Select
  7.         'mSht2.Cells.Clear
  8.         ReDim myOp15(15 To 18)
  9.         For i = 15 To 18
  10.             '這裡表單每一個控制項 循環 4次 指定相同物件的控制項
  11.             Set myOp15(i) = New allAppCls
  12.             Set myOp15(i).mySqlServer = New allServerCls
  13.             myOp15(i).mySqlServer.clsConn = conStr
  14.             Set myOp15(i).opt15 = Me.Controls("OptionButton" & CStr(i))
  15.             Set myOp15(i).mTb6 = Me.Controls("TextBox6")
  16.             Set myOp15(i).mTb7 = Me.Controls("TextBox7")
  17.             Set myOp15(i).comBox5 = Me.Controls("ComBoBox5")
  18.             Set myOp15(i).List3 = Me.Controls("ListBox3")
  19.             
  20.             Set myOp15(i).Command2 = Me.Controls("CommandButton2")
  21.             Set myOp15(i).mSht2 = Worksheets("Appsearch_Data")
  22.             myOp15(i).ck15 = i
  23.         Next
  24.         With ComboBox5
  25.             .AddItem "Server"
  26.             .AddItem "LocalHost"
  27.             .ListIndex = 0
  28.         End With
  29.         ListBox3.Clear
  30.     End Select
  31. End Sub
複製代碼
  1. Public Property Set List3(setList3 As MSForms.ListBox)
  2.     Set mList3 = setList3
  3.     MsgBox mList3.Parent.Parent.Parent.Name & "-" & mList3.Parent.Parent.Name & "-" & mList3.Parent.Name & "-" & mList3.Name
  4. End Property
複製代碼
感恩的心......(在麻辣家族討論區.用心學習會有進步的)
但資源無限,後援有限,  一天1元的贊助,人人有能力.

TOP

        靜思自在 : 甘願做、歡喜受。
返回列表 上一主題