LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing each cell for error [email protected] Excel Programming 2 June 14th 07 04:16 PM
Variable ComboBox on Userform DHallam Excel Programming 2 July 19th 05 12:20 PM
Testing for error : was 2nd Occurence Rodney New Users to Excel 5 April 29th 05 02:59 AM
testing more than one variable in an if statement Charles Excel Discussion (Misc queries) 3 February 22nd 05 06:46 PM


All times are GMT +1. The time now is 11:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"