tvkrys
Board Regular
- Joined
- Jan 23, 2006
- Messages
- 135
Hi all -
I have a file that requires multiple operations which I have broken up into several macros. I would like to string them together into one macro but there are two problems. I also have a related question.
1. Can a macro call up another macro or must the full code be added to a combined macro? If I can call it up, what would the code look like? Let’s say the macro to be called up is named “DeleteLeft” and is located in my PERSONAL.XLS file.
2. At the end of one macro, there is a decision to be made. If the answer is yes, I run a second macro. If the answer is no, I run a third macro, and then the second one. Is there a way to create a pop-up window at the end of the first macro that asks me if there is a cash issue, with a yes and a no button. Then, based on my answer, run the appropriate macro(s)? If so, what would the code look like?
3. The other problem is that there may or may not be an undisclosed number of links that must be removed. At the time, they are all within an established selection. Currently, I just keep clicking on a button that runs a custom “RemoveLink” macro. When there are no more links to remove, I get a run time error message, click “End” and then click on the next macro. (That way I don’t have to count how many links there are to remove. I just keep clicking till I get the error message.) Is there a way to have the macro run a loop until it runs out of an undetermined number of links to remove and then continue on with another macro or code? (The number of links to be removed numbers anywhere from 0 to 76, if that matters.)
I hope this all makes sense...
TIA, Krys
I have a file that requires multiple operations which I have broken up into several macros. I would like to string them together into one macro but there are two problems. I also have a related question.
1. Can a macro call up another macro or must the full code be added to a combined macro? If I can call it up, what would the code look like? Let’s say the macro to be called up is named “DeleteLeft” and is located in my PERSONAL.XLS file.
2. At the end of one macro, there is a decision to be made. If the answer is yes, I run a second macro. If the answer is no, I run a third macro, and then the second one. Is there a way to create a pop-up window at the end of the first macro that asks me if there is a cash issue, with a yes and a no button. Then, based on my answer, run the appropriate macro(s)? If so, what would the code look like?
3. The other problem is that there may or may not be an undisclosed number of links that must be removed. At the time, they are all within an established selection. Currently, I just keep clicking on a button that runs a custom “RemoveLink” macro. When there are no more links to remove, I get a run time error message, click “End” and then click on the next macro. (That way I don’t have to count how many links there are to remove. I just keep clicking till I get the error message.) Is there a way to have the macro run a loop until it runs out of an undetermined number of links to remove and then continue on with another macro or code? (The number of links to be removed numbers anywhere from 0 to 76, if that matters.)
I hope this all makes sense...
TIA, Krys