Hello,
I am brand new to excel VBA, and have been doing some work for a company that i am an intern for with it, but i am having difficulties with figuring out how to write the second part of code for a program i am trying to write. Initially the program takes in 4 inputs from the User, puts them into empty cells 1-4 and in the 5th cell is a password that must be copied as an output and placed into a text (.h) file after a specific position in place of the old password. Oh but it also has to copy the old file and save it as old.h incase there is a problem. What i am having the most difficulty with is trying to make a program that will search for specific line and input the 4 digit string in place of the old string. Also i have no cluse how to copy a file into a new text file with a new name besides reading the old file and writing the new one, but then it runs in one consecutive line. I dont know if this makes sense so basically what i am trying to do is:
Make a program that:
1. Searches for A .h (text) file
2. Copies the .h file into another file to save a copy of the old file.
3. Reads through the text file until it finds a specific line.
4. After the line is read a 4 digit string from a predefined value replaces the one in the initial program.
5. Saves the new file.
I can give more information if needed, i am not someone that uses forums, so i dont know the best way to write my problem.
Bookmarks