Results 1 to 2 of 2

Thread: CallByName (Resolved)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Posts
    306

    CallByName (Resolved)

    am I doing something wrong here?

    VB Code:
    1. CallByName frmProspects, frmProspects.chkRequired(i).Tag & ".backcolor", VbLet, &HC0FFFF

    what i'm trying to do is...I store the name of a textbox in the tag of a checkbox. I search through the checkboxes and if it's checked I want to turn the backcolor of the textbox(who's name is in the tag property of the checkbox) yellow.

    Can you do this with callbyname funtion and if not is there another way(or trick) to do it?

    I know I can search thru the all the controls until the name matches the one in the tag property but there are to many controls to do that and seems slopy. IMO
    Last edited by scostell; Dec 7th, 2001 at 03:23 PM.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Posts
    306

    GOt IT

    for those who may be struggling to figure this out also what I did was I set an object equal to the callbyname statement.

    set obj = callbyName(frmprospects, chkprospects.tag,vbget)


    and now the obj represents the object that was stored as a string value in the tag of the checkbox. so now i just

    obj.backcolor = vbyellow



    works perfectly.

    Thanks to anyone who read my question and hopefully I can help someone figure out the same problem.

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