Results 1 to 3 of 3

Thread: how to create textboxes at run time?

  1. #1

    Thread Starter
    Hyperactive Member schuurke28's Avatar
    Join Date
    Feb 2001
    Posts
    402

    how to create textboxes at run time?

    i'm using the createObject function but it doesn't work

    VB Code:
    1. Set oTextBox = CreateObject("MSForms.textBox")

    what am i doing wrong?

  2. #2
    Fanatic Member WorkHorse's Avatar
    Join Date
    Jul 2002
    Location
    Where you live.
    Posts
    591
    To create an object you would have to pass the programmatic identifier like this:

    VB Code:
    1. Set oTextBox  = CreateObject("Forms.TextBox.1")
    Use the same syntax to add a control to a UserForm at run-time.

    VB Code:
    1. Me.Controls.Add "Forms.TextBox.1", "MyBoxName", True

  3. #3

    Thread Starter
    Hyperactive Member schuurke28's Avatar
    Join Date
    Feb 2001
    Posts
    402
    Great, thx a lot!

Posting Permissions

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



Click Here to Expand Forum to Full Width