Hi,
i have a piece of code that i use to read a line from an ini file but i want to find out if it's a line that i don't want to read and i can't do this for some reason. here is the code:

Code:
Private Sub Command1_Click
Dim TxtStr As String
Nget IniLine, "Text", TxtStr ' i'll explain down
If TxtStr = "unwanted" Then Exit Sub
Select Case TxtStr
    Case Is = "unwanted"
      Exit Sub
    Case Is = ""
      Exit Sub
    Case Else
      Text1.Text = TxtStr
End Select
End Sub
'Nget' is a function i use to read ini files.
As you can see i have put 2 forms of detection to see if TxtStr is "unwanted".
This code ignor the "unwated" text and display it anyway.
It also displays any other text, but thats what it's supposed to do.

Can anyone tell me what am i doing wrong..?

thanks...