第2行加a
i=1
Open "1.txt" For Input As #1
Do Until EOF(1) = True
Line Input #1, s$
i=i+1
if i=2 then s$=s$+"a"
ss$ = ss$ + s$ + vbCrLf
Loop
Close #1

解决方案 »

  1.   

    a to b
    Open "1.txt" For Input As #1
    Do Until EOF(1) = True
    Line Input #1, s$
    s$=replace(s$,"a","b")
    ss$ = ss$ + s$ + vbCrLf
    Loop
    Close #1
      

  2.   

    改一下
    以上据输出到ss$第3行加2 a
    on error resume next
    i=1
    Open "1.txt" For Input As #1
    Do Until EOF(1) = True
    Line Input #1, s$
    i=i+1
    if i=3 then s$ = Left(s$, 2) + "a" + Right(s$, Len(s$) - 3)
    ss$ = ss$ + s$ + vbCrLf
    Loop
    Close #1