I have written several VBA “toggle” macros that enable the user to place the cursor in a word and have the word replaced by a different term. For example, if the user’s cursor is in “that” and the activating key is pressed, “that” is changed to “which”. The attached is a portion of the code for one of the toggle macros. There are several toggle macros because each focuses on particular types of changes.
This macro is used by several of us as we edit book manuscripts. (We are not on a central server; each of us works out of our home on standalone computers.) Unfortunately, I am the only person who has any clue about VBA (albeit what I know is very limited). Consequently, when someone comes across something they want to add to the macro, and this occurs with great frequency, they tell me what it is, I add it to the appropriate macro, and I then redistribute the template to everyone with a list of the newest additions..
What I want to do is create a macro that opens a dialog box in which the enduser enters the word to be changed and what it is to be changed to (both case sensitive), and indicates to which macro it is to be added by checkbox (that is, the macros would be listed and the enduser would select one). When the enduser clicks OK, this macro would then add the appropriate code to the checkmarked toggle macro. I have tried to create such a macro but with my limited knowledge of VBA have been wholly unsuccessful. So my question: Is what I want to do possible? If it is, any help would be appreciated.
Thanks.