简体   繁体   中英

AutoFill when user types into a combo box using VBA in excel

I'm currently working on a project that I need to have a combobox in an excel sheet for. I have the data needed for the combo box inside of a different sheet in the current workbook I am using.

My question is, is there a way to add autofill/autocomplete functionality to the box using VBA?

My code is as follows:

Private Sub ThirdFloorBox_Initialize()
ThirdFloorBox.Clear
ThirdFloorBox.List = Sheets(8).Range("A3:A37").Value
ThirdFloorBox.Visible = False
End Sub

Any suggestions would be helpful. FYI: I'm new to VBA as most of my coding experience comes from the front-end web world.

Thanks

最好在名称管理器中定义范围(服务Thirdfloorbox列表),然后在框的属性窗口中将该范围添加为行源。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM