发新话题
打印

求教

求教

各位仁兄:
   我想实现每点击一次增加一个控件,但代码好象有一点小问题.只能执行一次.而且重新按时没有出错
   Private Sub Command2_Click()
If AorNot Then
  Load a(a.UBound + 1)
   a(a.UBound).Visible = True
   a(a.LBound).Top = 120
    a(a.UBound).Top = a(a.UBound) + 495
    a(a.UBound).Caption = Text1.Text
   Else
   Load b(b.UBound + 1)
    b(b.UBound).Visible = True
   b(b.LBound).Top = 120
    b(b.UBound).Top = b(b.UBound) + 495
   b(b.UBound).Caption = "CC"
End If
End Sub

TOP

<因为你增加了控件之后,UBound已经变了

TOP

发新话题