#1
|
|||
|
|||
how do I handle user input not in combobox
Fundamental question, I know. But I cannot find what I expect is a very simple answer. I load the form in my combobox from an excel spreadsheet with no problem. And I populate my other textboxes when the user SELECTS from that list. Code:
Private Sub ComboBoxNames_Change() sheetRow = ComboBoxNames.ListIndex + 2 ' listIndex is base 0; first data in sheet is row 2 With Sheets(sheetName) TextBoxName.Text = .Cells(sheetRow, 1).Value TextBoxAddress.Text = .Cells(sheetRow, 2).Value TextBoxCity.Text = .Cells(sheetRow, 3).Value If .Cells(sheetRow, 4).Value = isActive Then OptionButtonActive.Enabled = True Else OptionButtonInactive.Enabled = True End If End With CommandButtonAction.Caption = updateAction CommandButtonAction.Enabled = True End Sub Code:
ComboBoxNames_Exit() ... |
Tags |
vba combobox |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
User input box with IF statement | ChrisJ83 | Word VBA | 9 | 11-13-2015 06:20 PM |
Taking input from InputBox from user | SeattleITguy | Excel Programming | 1 | 01-28-2015 09:05 AM |
vba: user input named argument | andrew12345 | Excel Programming | 2 | 11-18-2014 08:18 AM |
User input to a variable on the document | dsm1995gst | Word VBA | 1 | 09-03-2013 03:43 PM |
Replacing text with user input.?.?.? | brad1977 | Word | 3 | 11-20-2012 10:20 AM |