Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-31-2022, 11:32 AM
grNadpa grNadpa is offline how do I handle user input not in combobox Windows 10 how do I handle user input not in combobox Office 2016
Advanced Beginner
how do I handle user input not in combobox
 
Join Date: Mar 2022
Posts: 46
grNadpa is on a distinguished road
Default 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
I know that the ComboBoxNames.Listindex is 0 if I type something not in the list, but that doesn't help. I've tried substituting
Code:
ComboBoxNames_Exit() ...
but that doesn't populate my TextBoxes.
Reply With Quote
 

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
how do I handle user input not in combobox vba: user input named argument andrew12345 Excel Programming 2 11-18-2014 08:18 AM
how do I handle user input not in combobox User input to a variable on the document dsm1995gst Word VBA 1 09-03-2013 03:43 PM
how do I handle user input not in combobox Replacing text with user input.?.?.? brad1977 Word 3 11-20-2012 10:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft