here is the example content of my file:

line 4

i need only to replace "line 4" into "line4" and here the code to view this line by line:

Set myObj = CreateObject("Scripting.FileSystemObject")

Filestr = "c:\config2.ini"
Set myFile = myObj.OpenTextFile(Filestr)

Do Until myFile.AtEndOfstream
strLine = myFile.ReadLine
If InStr(strLine, "line 4") > 0 Then
strLine = Replace(strLine, "line 4", "line4")
End If

my problem is, Can this be possible to write the replacement on the readline? help pls.
sorry for my english and explanation...

No, and you are not saving the contents of each line into a variable so you can then later write out the corrected file. Presently you are doing nothing but reading the file and not even closing it, but beyond that, you logic is sound so far...

Good Luck