Gordon563265

Private Sub Command1_Click()
Dim ime As Variant
Dim sifra As Variant
Dim FileName As String

Text = Text2.Text

Open "c:\sifra.txt" For Input As #

Input #1, ime, sifra
Do Until ime = Text

Input #1, ime, sifra

Loop

Close

Text1.Text = sifra

End Sub

This Is my simple program that I am having a problem with. What I am trying to do is to search a text file. I want to type a text in a text box, and my program should find that word and print line where that word is.

My problem is in case sensitivity. How can I ignore case sensitivity and when I type word in textbox, program find that word In text file no meter of case property




Re: Visual Basic Express Edition Case Sensitivity Problem...

DMan1

Put both the textbox text and the line input to the same case (ToLower) or (ToUpper)




Re: Visual Basic Express Edition Case Sensitivity Problem...

Gordon

Ok, but, I need to print some names in document, and just first letter should be upper case. How should I do that






Re: Visual Basic Express Edition Case Sensitivity Problem...

DMan1

Use a temporary variable for your line:

TheCurrentLine = ime.ToLower

Alos you may wish to consider using the SYstem.IO namespace for you file IO instead of the legacy Input function