I am trying to replace wording in a word file using an excel file. Based on if a user selects yes or no to a question, there will either be a few pages of wording or no wording at all. What I have done is set up placeholders in the word file (%placeholder1%, %placeholder2%, etc) and if the user answers no, the placeholders are replaced by "". If the user selects yes, %placeholder1% is replaced by cell A1, %placeholder% by cell A2, etc.
I got the loop macro to work when I was bringing up the file and saving it all in that one macro, but I need to do this for several questions in the same file. So I need to have the test macro call a few loop macros. Not sure how to get it working with opening the word file in the main macro instead of the loop one. Here is my code:
I am running into a problem in the test macro here: Worksheets("EngineeringFee").Range("A1").Select
EDIT: The error is "select method of Range class failed"
In the test macro, I am going to need to be able to call loop, loop2(another macro), loop3, etc. Therefore I think I need to set the active cell each time to where it needs to be for the loop macro as that is how I iterate through cells. I'm not sure if I need to change how I iterate through. I plan on making a search macro to cut down on code length, and I'm sure there are other ways I could make the code more efficient but I just need the damn thing to work!
Any help would be greatly appreciated.
Bookmarks