Hello everyone!

I have created a fairly basic application in vb6 which is able to open a text file, load it into a text box control and successfully save it again. So far so good...

What I need to do is find text in this text file and replace it with something new. This part isn't too hard for me, but what is hard is that I have to search for a specific word then replace the integer after it but multiply it first... As lost as I am? Here's what I mean:

I have a text file with a list of variables.

var1=12345
var2=12345
var3=12345
etc.

So what I need to do it find var2 and change just the integers after it. But before I change them, I have a text box in which the user will input a number. Then the var2=# need to be multiplied by text box number. So if the user enters, "5" then it should search for var2 and multiply 12345 * 5 and return a value of 61725. (for example)

So again, the user can load a text file full of variables, then set a number to multiply a specific variable by and the program will find all the variables with that name in the file and replace them with the new value.

If anyone can help me dive in to this one it would be greatly appreciated...