I have UserForm with three ComboBoxes (PropertyName,HouseNumber,HotelNumber) that have hard coded options and I have a few TextBoxes (Rent) that I need to populate when a value is selected from each ComboBox. It currently only works when I press enter for each TextBox.
Code
Private Sub Rent_Enter()
'MEDITERRANEAN AVENUE
'houses 1-10
If InStr(PropertyName.Text, "Mediterranean Avenue") And InStr(HouseNumber.Text, "1") And InStr(HotelNumber.Text, "0") Then
Rent.Value = "10"
Else
If InStr(PropertyName.Text, "Mediterranean Avenue") And InStr(HouseNumber.Text, "2") And InStr(HotelNumber.Text, "0") Then
Rent.Value = "30"
Else
If InStr(PropertyName.Text, "Mediterranean Avenue") And InStr(HouseNumber.Text, "3") And InStr(HotelNumber.Text, "0") Then
Rent.Value = "90"
Else
If InStr(PropertyName.Text, "Mediterranean Avenue") And InStr(HouseNumber.Text, "4") And InStr(HotelNumber.Text, "0") Then
Rent.Value = "160"
Display More
The Code repeats with all options and ends with
I have tried Changing the Rent_Enter to something else but then it doesn't work at all. Nothing in this UserForm pulls from a spreadsheet. I'm only using it to reference predetermined static values.
I'm sorry if this is hard to read I absolutely know nothing about VBA everything I have done is from 3 weeks of google searching.