G
gwoodby
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
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