Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error testing combobox to variable
Please Help!!!
When Pressing the add button it continually returns the msg ouch and 0, 2 like cnt is not incrementing Any idea how to make this work? As i said before im still very new to "programming" and im not very good at it. but im trying to figure it out.. so any assistance would be greatly apreciated Private Sub CmdAdd_Click() Dim strNewPerson As String Dim NewName As String Dim cnt As Long Dim NewParent As String Dim Mynumber As Integer Dim i As Boolean i = False NewName = TxtFirstName & "," & TxtLastName Do While cnt <= CBONames.ListCount - 1 Or i = True ' CBONames Combobox 2 For cnt = 0 To CBONames.ListCount - 1 If NewName = CBONames.List(cnt) Then ' NewName is Combobox 1 MsgBox "hello" MsgBox cnt & " " & Mynumber End If If NewName < CBONames.List(i) Then MsgBox "ouch!" MsgBox cnt & " " & Mynumber End If Next Loop End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Testing each cell for error | Excel Programming | |||
Variable ComboBox on Userform | Excel Programming | |||
Testing for error : was 2nd Occurence | New Users to Excel | |||
testing more than one variable in an if statement | Excel Discussion (Misc queries) |