# listbox as Variable

**URL:** <https://forum.xojo.com/t/listbox-as-variable/48659>\
**Category:** macOS\
**Created:** [May 22, 2019, 10:36pm UTC](https://forum.xojo.com/t/listbox-as-variable/48659 "2019-05-22T22:36:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denis\_Despres](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/65b543/32.png) [@Denis\_Despres](https://forum.xojo.com/u/Denis_Despres)\
**Post date:** [May 22, 2019, 10:36pm UTC](https://forum.xojo.com/t/listbox-as-variable/48659/1 "2019-05-22T22:36:02Z")

</div>

Hi Everyone  
How can i refer a listbox in variable:  
Ex.: in a loop through dataset items, i want to split data between five existing listbox base on one datafield result  
how can i refer to which listbox populate with a variable as listbox  
i have too many item to put (IF) on each items, i want to set the destination listbox at the top, then and refer to it by variable  
Maybe “Variable” is not appropriate term for that use… That why i’m asking here  
Thanks

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [May 22, 2019, 10:41pm UTC](https://forum.xojo.com/t/listbox-as-variable/48659/2 "2019-05-22T22:41:39Z")

</div>

[https://forum.xojo.com/54022-passing-listbox-name-when-saving-listbox-data](https://forum.xojo.com/54022-passing-listbox-name-when-saving-listbox-data)  
Just store it in a variable of the type Listbox and not of the specific lisbox name.

---

<div class="post-metadata">

**Author:** ![Denis\_Despres](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/65b543/32.png) [@Denis\_Despres](https://forum.xojo.com/u/Denis_Despres)\
**Post date:** [May 23, 2019, 3:49pm UTC](https://forum.xojo.com/t/listbox-as-variable/48659/3 "2019-05-23T15:49:58Z")

</div>

Thanks Tim… It work great with Extends

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [April 29, 2021, 3:57pm UTC](https://forum.xojo.com/t/listbox-as-variable/48659/4 "2021-04-29T15:57:02Z")

</div>


