My macro keep on running even though it should stop

  • Hi

    I am a new VBA user and working on a project. I made two two macros i.e. models. In the beginning I wanted to ask the user to decide which model to run. So when user enters 1 the model 1 runs fine right till the end when I entered a msg box whether he want to recalculate. Now here is the problem. If I click yes then everything works accordingly that it runs all over again but if I click 'No' it should end it there. But it reruns the model 1. I am not sure what is the problem.

    Here is my code

  • Welcome to the Forum. Please read the Forum Rules to understand how the Forum works and why I have added Code Tags to your post

    All VBA code posted in the forum must be wrapped in code tags, which you omitted, including single-line code snippets.Be sure to use them in future posts.

    How to use code tags

    Note: no apostrophe in the tags, just used for demonstration here.


    your code goes between these tags


    Or, just highlight all of the code and press the <> in the post menu above button to add the code tags.


  • Hey Roy, I found the solution. Actually I was using Run to run another macro. I have used Call and now its working now. I do not know why it was a problem but it is working fine for now.

    Anyways, thanks for the help Roy!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!