View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ryan H Ryan H is offline
external usenet poster
 
Posts: 489
Default Text Box Updating

You might have one of the elements of the combobox spelled wrong. I
personally like to you the .ListIndex property instead to avoid this problem.
For example,

Private Sub Address_21_Change()

Select Case Me.Address_21.ListIndex
Case Is = 0: Me.City_1 = "Valrico" '2306 Long Green Court
Case Is = 1: Me.City_1 = "Atlanta" '3440 Oakcliff Road
Case Is = 2: Me.City_1 = "Tampa" '7015 East 14th Aveneue
Case Is = 3: Me.City_1 = "Gastonia" '1800 Taylor Drive
End Select

End Sub


Hope this helps! If so, let me know, click "YES" below.
--
Cheers,
Ryan


"Brian" wrote:

I am having trouble getting a text box to auto fill from a choice made from a
combo box.

Combo Box Name is Address_21
Text Box Name is City_1

My code is as follows:

'Auto Fill CES Spec Written Office

Private Sub Address_21_Change()

Select Case Address_21
Case ""2306 Long Green Court"
City_1 = "Valrico"
Case ""3440 Oakcliff Road"
City_1 = "Atlanta"
Case "7015 East 14th Aveneue"
City_1 = "Tampa"
Case "1800 Taylor Drive"
City_1 = "Gastonia"
End Select

End Sub

Can someone help me figure out what I did incorrectly?