Eyes0ftheworld
New Member
- Joined
- Apr 23, 2014
- Messages
- 28
Hi All!
I'm having issues referencing a ListBox within a spreadsheet. I'm using Mac Excel 2016 and they unfortunately went away with UserForms all together, so I've been forced to build my own forms within the cells.
Currently, when I want to add a value to ListBox based on a cell value, I use the below code:
I feel like there's a simpler way to reference a listbox or button within a spreadsheet. I'm always running into errors when I try and build out macros. When they used to be in a UserForm, it was as simple as just referencing the shapes' name. Any help here would be great. Thanks!
I'm having issues referencing a ListBox within a spreadsheet. I'm using Mac Excel 2016 and they unfortunately went away with UserForms all together, so I've been forced to build my own forms within the cells.
Currently, when I want to add a value to ListBox based on a cell value, I use the below code:
Code:
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008f00; background-color: #ffffff}</style>[COLOR=#008F00][FONT=Menlo]Worksheets("Directions").Shapes("SELECTEDGEOListBox").OLEFormat.Object.AddItem Worksheets("Directions").Range("A103").Value[/FONT][/COLOR]
I feel like there's a simpler way to reference a listbox or button within a spreadsheet. I'm always running into errors when I try and build out macros. When they used to be in a UserForm, it was as simple as just referencing the shapes' name. Any help here would be great. Thanks!
Last edited: