| Author |
Need help with replacing multiple strings of code
|
|
|
| I have this problem.
I am redoing my code and I came to the point that I need to replace line:
TapiRep = TapiRep & vbCrLf & "Command_formload " & CommandTail
with
Call SendData("Command_formload " & CommandTail)
Of course the part after TapiRep & vbCrLf & is not the same. Each line I
want to change has different parameters.
and I have over 400 lines of code to change!!!
Using Replace feature in visual basic I can replace:
TapiRep = TapiRep & vbCrLf &
with
Call SendData(
and there is not a problem with that.
The problem is with the ending bracket )
How can I add it to that automatically?
Can it be done?
Your thoughts please,
Jack
| |
| Larry Serflaten 2005-11-27, 9:55 pm |
|
"Jack" <replyto@newsgroup> wrote
> I have this problem.
> I am redoing my code and I came to the point that I need to replace line:
>
> TapiRep = TapiRep & vbCrLf & "Command_formload " & CommandTail
> with
> Call SendData("Command_formload " & CommandTail)
>
> Of course the part after TapiRep & vbCrLf & is not the same. Each line I
> want to change has different parameters.
> and I have over 400 lines of code to change!!!
<...>
> The problem is with the ending bracket )
> How can I add it to that automatically?
> Can it be done?
How about spending 10 minutes and writing an app that will read the files
and do the replace for you?
LFS
| |
|
| Jack
Or you could copy the code into Word (or similar) and use the more powerful
Finds&Replace there, also with Word you can alter it in stages without the
IDE complaining about syntax errors when you are half way through.
Dave O.
"Jack" <replyto@newsgroup> wrote in message
news:uMdCU$68FHA.2576@TK2MSFTNGP12.phx.gbl...
>I have this problem.
> I am redoing my code and I came to the point that I need to replace line:
>
> TapiRep = TapiRep & vbCrLf & "Command_formload " & CommandTail
> with
> Call SendData("Command_formload " & CommandTail)
>
> Of course the part after TapiRep & vbCrLf & is not the same. Each line I
> want to change has different parameters.
> and I have over 400 lines of code to change!!!
>
> Using Replace feature in visual basic I can replace:
> TapiRep = TapiRep & vbCrLf &
> with
> Call SendData(
>
> and there is not a problem with that.
> The problem is with the ending bracket )
> How can I add it to that automatically?
> Can it be done?
> Your thoughts please,
> Jack
>
>
|
|
|
|