Board logo

标题: 求教 [打印本页]

作者: wdp221651    时间: 2006-8-18 18:31     标题: 求教

各位仁兄:
   我想实现每点击一次增加一个控件,但代码好象有一点小问题.只能执行一次.而且重新按时没有出错
   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
作者: Nothing    时间: 2006-8-18 20:59

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




欢迎光临 编程开发论坛 (http://bbs.lihuasoft.net/) Powered by Discuz! 6.0.0