I've wasted the last couple of hours trying to figure this out. I want to get the text of the selected value in a Form Controls listbox which is in a worksheet. In Excel 2003 I could just type:
Sheets(1).Range("A1").Value = myListBox.Text
The best I've been able to do in Excel 2007 is to get the index and that uses
Sheets(1).Range("A1").Value = Sheets(1).ListBoxes(1).ListIndex
The command works fine if I put the listbox in a userform instead, but I need to have it on a worksheet. I also don't understand why I have to use ListBoxes instead of whatever I name the listbox. Has MS changed something in 2007 or have I just done something wrong?
Bookmarks