开发者

VB script + replcae word in txt

开发者 https://www.devze.com 2023-01-04 04:55 出处:网络
code , that find in the txt file the line that start with the : THIS_LOCATION and replace the OFF_LINE with NEW

code , that find in the txt file the line that start with the : THIS_LOCATION and replace the OFF_LINE with NEW

if InStr(strText , 'THIS_LOCATION' ) then

strNewText = Replace(strText, "OFF_LINE", "NEW")

End if

the VB script failed on t开发者_JS百科he line :

if InStr(strText , 'THIS_LOCATION' )

what wrong?

THX yael


You need double quotes:

If InStr(strText, "THIS_LOCATION") Then
0

精彩评论

暂无评论...
验证码 换一张
取 消