Hy all.
Long time no see...

I don't understand how I can have a problem that doesn't appear when I step through my program in debug mode and does appear when I run the EXE file.

I keep getting an error message only in the exe program:
"object variable or with block variable not set"
run time error 91.

Is this a known problem that only occurs when running the exe file?

I have changed the enviroment version from vb5 to vb6.
could that be the cause of the problem???

I have traced the problem to this code:

'cur_cb is ither a combobox or a listbox
Public Function combo_list(cur_cb As Control, Optional text_str)

Dim found As Integer
If IsMissing(text_str) Then
check_test = cur_cb.Text
Else
check_test = text_str
End If

For i = 0 To cur_cb.ListCount - 1
If check_test = cur_cb.List(i) Then
found = 1
Exit For
End If
Next

If found = 1 Then
combo_list = i + 1
Else
combo_list = -1
End If

End Function

If anybody could spot out an obvious problem I would be gratefull...

Thanks.
Dan.