Results 1 to 4 of 4

Thread: [RESOLVED] Text Box Question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Location
    Lahore
    Posts
    214

    Resolved [RESOLVED] Text Box Question

    Hi Everyone
    take a look at this

    VB Code:
    1. For z = 1 To UBound(strblock)
    2. 'some other code
    3. name1_ = Val(name1)
    4. [B]Text(name1_).Text = ("IVR " & name1 )[/B]
    5. 'some other code
    6. next z

    i have several text boxes which i have named as "text11" , "text12" , "text22" .. and so on
    and this variable "name_" gets this value at run in loop "11","12","21" ...
    but above given line (the one i have set as bold) . doesnt work .. it prompts like " sub or function not defined "
    along with this .. i havent declared those text boxes as control arrays .. no index set ... do i need to , how can i make thsi expression work
    Regards

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Text Box Question

    Using control array could be better approach...

    Anyway, instead of

    Text(name1_).Text

    try using this:

    Me.Controls("Text" & name1).Text

    where name1 is the dynamic value and will represent your 11, 12, etc, etc, etc ...
    How you will assign those numbers is entirely up to you.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Location
    Lahore
    Posts
    214

    Re: Text Box Question

    Thanks .. rhino bull .. full points

  4. #4

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