Hello All,
I have completed my AMEX subtotal macro, but need to add one more feature. If my company has a new card member, I need to add that person to the existing vba code plus I need to increase the number by one of his/her replacement "name". I want to be able to edit the code at the touch of either a form control button or an active x button, whichever works. The form control/active x button will trigger a pop up message window that shows the following:
"Do you want to add this person's name?"
The user must enter the new person's name in the field below. In this case, it is: Patrick H. Henry
Below that, the user will have the option to click "Yes" or "Cancel"
If the user clicks, "Yes", the code will be added to the macro named "AM_namestonumbersandnames". This macro can also be found on the sheet attached. Note that I have not edited the macro.
Here is my wished for code of "AM_namestonumbersandnames" if the user clicks on the "yes" button on the pop up message window:
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Note the code in bold. Not only have I added a new name to the code but I have increased the number before his name by one from the previous name. (i.e. "9James A Kake" to "10Patrick H Henry") This way I can sort his name in accordance with the original AMEX statement order. Any future names must also increase by one whole number. Therefore, the next added card member will have an eleven added to the code and the one after that will have a twelve added and so forth and so on. Therefore the button must have a counter.
If anyone out there can add code to the existing code via the use of a button, that would be most helpful. I have added an active x button to the attached worksheet called "Add a new card member?" as an example only. You may edit it/change it at will and it is not assigned to any macros.
Thanking you in advance for your help.
Best,
AndrewTemplate for Forum.xlsm
Bookmarks