If it's NOT an ActiveX listbox then you need to do something like
Application.EnableEvents = FalseWith ActiveSheet.ListBoxes("List Box 1") ' Change the name if necessary For lngIndex = 1 To .ListCount If .Selected(lngIndex) Then ActiveCell.Valuet = .List(lngIndex) Exit For End If NextEnd WithApplication.EnableEvents = True
Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.
Open in new window