+ Reply to Thread
Results 1 to 2 of 2

checkbox in runtime

Hybrid View

  1. #1
    jmartinez.pincheira@gmail.com
    Guest

    checkbox in runtime

    Hi, I hope that you can help me about this question.

    I have a form with a tabstrip, in some of the frames that I'm using in
    the tabstrip I need to create some checkboxes, until here everything
    its ok but when I try to work with the click event of the checkbox it
    doesn't work. Which is the correct form to do it?

    With TabStrip1
    Load Frame1(i)

    Set chk = Controls.Add("vb.checkbox", "check1" & (i), Frame1(i))
    chk.Move 3120, 3480, 255, 255
    chk.Visible = True
    If check1(i).Value = Checked Then 'error Object variable or With
    variable not set
    For h = 0 To 8
    Set t = Controls.Add("VB.TextBox", "TextBox" & (i) & (h),
    Frame1(i))
    t.Move xcor(h), ycor(h) + 4000, twidth(h), theight(h)
    t.Visible = True
    Next
    End If
    End With

    xcor, ycor, twidth y theight are Arrays

    thanks in advance

    Javier Martinez


  2. #2
    Bob Phillips
    Guest

    Re: checkbox in runtime

    Suggested alternative. Add the checkboxes and the event code at design time,
    and hide them until you need them .

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    <jmartinez.pincheira@gmail.com> wrote in message
    news:1145083834.313354.195400@t31g2000cwb.googlegroups.com...
    > Hi, I hope that you can help me about this question.
    >
    > I have a form with a tabstrip, in some of the frames that I'm using in
    > the tabstrip I need to create some checkboxes, until here everything
    > its ok but when I try to work with the click event of the checkbox it
    > doesn't work. Which is the correct form to do it?
    >
    > With TabStrip1
    > Load Frame1(i)
    >
    > Set chk = Controls.Add("vb.checkbox", "check1" & (i), Frame1(i))
    > chk.Move 3120, 3480, 255, 255
    > chk.Visible = True
    > If check1(i).Value = Checked Then 'error Object variable or With
    > variable not set
    > For h = 0 To 8
    > Set t = Controls.Add("VB.TextBox", "TextBox" & (i) & (h),
    > Frame1(i))
    > t.Move xcor(h), ycor(h) + 4000, twidth(h), theight(h)
    > t.Visible = True
    > Next
    > End If
    > End With
    >
    > xcor, ycor, twidth y theight are Arrays
    >
    > thanks in advance
    >
    > Javier Martinez
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1