This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comparing listbox option with a variable value

 
Sree Mami
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I compare an option of Listbox with a variable and make it get selected.
 
Pavan Keely
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sree,

Here is a piece of code...



Basically, you have to loop through all the values of the options and see if that matches with the required value. If yes, select that option.

Hope this helps.
 
Sree Mami
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pavan

Thanks for the reply. It surely works for my task. Actually I tried it but somewhere I went wrong. May be in referencing within the loop...

Thanks a lot...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic