Forum Discussion
Excel 365 ActiveX Textbox for "Search as you type" not working on second monitor
- Oct 20, 2021
It isn't clear to me what you see in the two different windows when using laptop with an external monitor. Is it two different worksheets? Two views of the same worksheet?
I tested by creating a second window to display Sheet1. I sized the windows so one of them displayed just TextBox 1, while the other showed just the Table. When the textbox was in Window 2, I couldn't select it. When the textbox was in WIndow 1, the code shown below worked as desired.
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) Dim xStr As String, xName As String Dim xRg As Range Application.ScreenUpdating = False With TextBox1 xName = "Materials" xStr = .Text Set xRg = .Parent.ListObjects(xName).Range If xStr <> "" Then xRg.AutoFilter Field:=2, Criteria1:="*" & xStr & "*", Operator:=xlFilterValues Else xRg.AutoFilter Field:=2, Operator:=xlFilterValues End If End With End Sub
Since May 2021, this feature (data validation dropdowns filter the list in response to what you type) has been available to users of Microsoft Online. Just save the file on OneDrive and access it using a web browser.
I hope it comes to desktop Excel soon.
- alex_nOct 18, 2021Brass ContributorAfter giving it a try, I see that it does not answer my question: it does not instantly filter as I type.
- byundtOct 18, 2021Brass Contributor
"it doesn't instantly filter as I type"
You may have to wait a fraction of a second for the web connection to refresh, but the selections offered do update as you type. I tested that feature just now, and confirmed that it is still working as described in Microsoft's feature announcement in Spring 2021.
Were you using a web browser to access a file stored on OneDrive? The feature won't work if you use desktop Excel to open the file.
If you would like me to investigate VBA solutions to the problem, please post a sample workbook showing your code and a working dropdown. The sample workbook doesn't need to contain anything other than a sample dropdown with five or ten choices and the code that is not working the way you want.
I'd like to verify that the code is installed in the right place, name references are correct, etc. Even if those details are all correct, there may be a different event that might provide more responsiveness,.
- alex_nOct 19, 2021Brass ContributorThat would be great of you to investigate the problems I have posted originally. Here is the link to the OneDrive folder as you have requested.
https://1drv.ms/x/s!Aqv4zBSFNKaymT6dx2W3aOhdfCbX?e=SrcI5A
Thanks in advance.
Al.
- alex_nOct 15, 2021Brass ContributorThank you for your response. But I don't use the online excel for this.