I am trying to add an active x list box to my spreadsheet. I have added the box, but I can't figure out how to add the text that I want to appear in the list. I want to be able to select yes or no from the drop down.
I am trying to add an active x list box to my spreadsheet. I have added the box, but I can't figure out how to add the text that I want to appear in the list. I want to be able to select yes or no from the drop down.
You can set the ListFillRange property to cells on the worksheet, or use code likeOriginally Posted by dmg7502
[vba]
With Activesheet.Listbox1
.AddItem "Yes"
.AddItem "No"
End With
[/vba]
But with just two options why not use a checkbox?
Or you could use Data | Validation (List), for an in-cell drop down box.
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables
One simple way: enter Yes and No in a range, and then use that range to define the controls ListFillRange property.
Overall, I use this approach probably 90% of the time. It's probably just me, but I do not like using ActiveX controls on worksheetsOriginally Posted by firefytr
You're not alone there Patrick!
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables
Why? They are the only flexible worksheet controls.Originally Posted by firefytr
I find them cumbersome, overtly expensive in terms of spreadsheet design and elegance, difficult for users to create/use, don't work on Mac solutions, and I think (generally and usually) the process can be performed on the worksheet more effectively without the controls. Not to mention the past bugs they have had (there are still a lot of older versions without updates out there).
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables
Allow me to clarify--I do not like any worksheet controls.Originally Posted by xld
If I need controls, I'd rather use a UserForm, which has much, much, much greater flexibility.