View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Re-starting a project but avoiding recursion???

Ladies and Gents -
I have a project, several subs and functions and forms. While running one of
the subs, it is checking to see if the user wants to add some new data. If
that is true, then it creates a new entry on the worksheet (I am using the
worksheet like a database). But then, at that point, after the new data is
added at the end of the sheet, I need it to re-start, by running the "main"
macro that the user normally activates when the sheet first opens (I have a
button on the worksheet for this).

If I use the Call method, it seems that there is some sort of recursion
going on. Weird things happen... including a Windows fatal error.

How can I jump out of a sub, and then restart the entire project by starting
the original macro again?

Thanks!