VBA drop down list userform
MuhammadZahid-7570 asked Dec 28, '20 | GabrielDzsurdzsa-8881 commented Aug 26, '21 Searchable Combobox in Excel Userform VBAI am working on a management system in excel using userform Comment Comment · Show 2 Comment 5 |1600 characters needed characters left characters exceeded
Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total. erinding-msft · Dec 29, 2020 at 07:50 AM Hi @MuhammadZahid-7570, Please check if the answer given by HansV-7609 is helpful for you. If an Answer is helpful, please click "Accept Answer" and upvote it. 0 Votes 0 · erinding-msft erinding-msft · Jan 05, 2021 at 08:16 AM @MuhammadZahid-7570 How is your issue going? 0 Votes 0 · HansV-7609 answered Dec 28, '20 | GabrielDzsurdzsa-8881 commented Aug 26, '21 A userform combo box will do that automatically for you. Make sure that the items you want to see in the dropdown list are stored in a column on a worksheet, for example in A1:A20 on Sheet1. In the Visual Basic Editor, select Insert > UserForm. That's all! Comment Comment · Show 2 Comment 5 |1600 characters needed characters left characters exceeded
Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total. MichaelCavaggioni-8875 · Mar 29, 2021 at 09:24 PM @HansV-7609 - I see you are a real excel master...great job question - i'm new to coding - can't seem to figure out a simple code to add in a userform to have staff enter details in text box and have it entered into my spreadsheet. thank you in advance 0 Votes 0 · GabrielDzsurdzsa-8881 MichaelCavaggioni-8875 · Aug 26, 2021 at 10:24 PM HansV-7609's post is the answer. In case you wanted screenshots and code sample to go along with his solution. excel-vba-combobox-to-query-and-insert Private Sub ComboBox1_Change() With ThisWorkbook.Sheets("Sheet1") .Range("B1").value = ComboBox1.value End With End Sub Private Sub InsertButton_Click() With ThisWorkbook.Sheets("Sheet1") .Range("B1").value = ComboBox1.value End With End Sub Private Sub QueryButton_Click() With ThisWorkbook.Sheets("Sheet1") For Each cell In .Range("A1:A14") If cell.value = ComboBox1.value Then cell.Interior.Color = vbYellow End If Next cell End With End Sub0 Votes 0 · |