View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Oreg[_18_] Oreg[_18_] is offline
external usenet poster
 
Posts: 1
Default Combobox run time error

Hello. Back again with another trouble. I keep getting a run tim
error 13 when I arrow down the list that combobox4 displays when th
form is opened. Is there some code I can enter that once I arrow dow
to an empty cell, combobox will go back to the top of the list i
column D? Thanks in advance!


Private Sub combobox4_Click()
Dim dt As Long
With crit
If .ComboBox4.ListIndex = -1 Then Exit Sub
dt = ComboBox4.Value
For Each Cell In Worksheets("METRO").Range("D1:D200")
If Cell.Text = dt Then
TextBox1.Value = Cell.Offset(0, 3).Text
TextBox2.Value = Cell.Offset(0, -2).Text
TextBox3.Value = Cell.Offset(0, 30).Text
TextBox4.Value = Cell.Offset(0, 23).Text
TextBox5.Value = Cell.Offset(0, -1).Text
TextBox6.Value = Cell.Offset(0, 1).Text
TextBox7.Value = Cell.Offset(0, 2).Text
TextBox8.Value = Cell.Offset(0, 4).Text
TextBox9.Value = Cell.Offset(0, 6).Text
TextBox10.Value = Cell.Offset(0, 7).Text
TextBox11.Value = Cell.Offset(0, 8).Text
TextBox12.Value = Cell.Offset(0, 16).Text
TextBox13.Value = Cell.Offset(0, 9).Text
TextBox14.Value = Cell.Offset(0, 31).Text
TextBox15.Value = Cell.Offset(0, 32).Text
TextBox16.Value = Cell.Offset(0, 26).Text
TextBox17.Value = Cell.Offset(0, 27).Text
TextBox18.Value = Cell.Offset(0, 5).Text

End If
Next
End With
End Su

--
Message posted from http://www.ExcelForum.com