PC Review


Reply
Thread Tools Rate Thread

ComboBox Will Not Advance To next Item in list

 
 
Minitman
Guest
Posts: n/a
 
      29th May 2008
Greetings,

I have a ComboBox that is loaded with 27 rows by 126 columns of data.

Here is the code:

===========================================================
Option Explicit
Dim blnRunningUFI As Boolean
Dim iListIndexInput As Integer
Dim iTD As Integer
Dim rListInput As Range
Dim wb2 As Workbook
Dim ws2 As Worksheet
_________________________________________________________________
Private Sub Input_1_Change()

If blnRunningUFI Then Exit Sub
LoadInputs

End Sub
_________________________________________________________________
Public Sub LoadInputs_1()
Dim i As Integer
'This loads the ComboBox ((Input_1)
ws2.Activate
Set rListInput = ws2.Range("rInput" & iTD).Offset(1, 1)
With Input_1
.RowSource = "'Input'!" & rListInput.Address
.ColumnCount = rListInput.Columns.Count
.ListIndex = 0
End With

End Sub
_________________________________________________________________
Public Sub LoadInputs()
Dim i As Integer
'Loads the 125 TextBoxes and the one ComboBox (Input_1)
i = 0
For i = 1 To 126
Me.Controls("Input_" & i).Value = _
rListInput.Cells(iListIndexInput, i - 1).Value
Next i
Input_1.SetFocus

End Sub
_________________________________________________________________

Private Sub UserForm_Initialize()

blnRunningUFI = True 'UFI Running

Set wb2 = ThisWorkbook
Set ws2 = wb2.Worksheets("Input")
iTD = wb2.Sheets("Enter").TBEnter.Value

LoadInput_1
LoadInputs

blnRunningUFI = False 'UFI finished Running

End Sub
=======================================================

At present, this code will load Input_1 when initialized. It is when
I choose Input_1's drop down the problems begin. The drop down does
show the 27 rows and the 126 columns, but if I choose anything but the
first choice, I get the first choice (row 1). I cannot get any other
row.

I know I'm missing something, I just can't see what it is.

Anyone have any ideas or thoughts as to how to fix this code? Or for
that matter, any ideas as to alternate methods of advancing each
record,

Any help will be appreciated.

-Minitman
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
combobox display item when not in list Nick X Microsoft Access Forms 1 3rd Nov 2009 09:18 PM
Add Item To ComboBox List Minitman Microsoft Excel Programming 7 3rd Sep 2008 01:10 AM
combobox list item with superscript =?Utf-8?B?Ym95emU=?= Microsoft Excel Programming 1 26th Apr 2006 06:07 PM
Re: Can't populate combobox list with 1 item Steph Microsoft Excel Programming 1 11th Aug 2004 10:11 PM
Re: Can't populate combobox list with 1 item Steph Microsoft Excel Programming 0 11th Aug 2004 10:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:47 AM.