VB 텍스트 파일 문자열 치환 소스
페이지 정보
작성자
본문
Const ForReading = 1
Const ForWriting = 2
Private Sub Command1_Click()
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("도로명.txt", ForReading)
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
strLine = Replace(strLine, "태사 2길", " 태사2길")
strNewText = strNewText & strLine & vbCrLf
Loop
objFile.Close
Set objFile = objFSO.OpenTextFile("도로명.txt", ForWriting)
objFile.WriteLine strNewText
objFile.Close
End Sub
댓글목록
등록된 댓글이 없습니다.