tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,834
- Office Version
- 365
- 2019
- Platform
- Windows
I came across this thread and it seems to work if the list is on the same worksheet as the combobox:
Can someone please tell me how to amend it if the list is on a different sheet?
I tried changing this part of the code:
but I get a permission error message.
Thanks
How to use a ComboBox with autocomplete and search as you type.
Hi, I have a ComboBox embedded in a worksheet that references a list of items. Ie: small cat cat big cat small dog dog big dog Right now when I type in 'cat' i only get 'cat' as the suggestion. What I would like is to get all items that contain 'cat'., ie., in this case: small cat cat big...
www.mrexcel.com
Can someone please tell me how to amend it if the list is on a different sheet?
I tried changing this part of the code:
Code:
Private Sub ComboBox1_DropButtonClick()
With Me.ComboBox1
.List = Worksheets("Sheet1").Range("A2", Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp)).Value ' CHANGING THIS LINE CAUSES PROGRAM TO CRASH
.ListRows = Application.WorksheetFunction.Min(6, .ListCount)
.DropDown
End With
End Sub
but I get a permission error message.
Thanks