Run VBA macro when condition is met

Posted by Pieter on Stack Overflow See other posts from Stack Overflow or by Pieter
Published on 2010-03-08T10:30:49Z Indexed on 2010/03/08 10:36 UTC
Read the original article Hit count: 652

Filed under:

Hello all,

I'm creating a spreadsheet to train my numerical skills.

Now, I use VBA macros to generate a new problem once the current one has been correctly solved. To do so, I still have to press a button in the worksheet, which costs time and is annoying.

Is there a way that I can execute a macro when a certain condition is met?

for instance:

if A1 = "correct!"
then <run macro>
else <do nothing>

Also, let me know if you're interested in the spreadsheet, I'd be happy to share it with you guys.

best, Pieter

© Stack Overflow or respective owner

Related posts about vba

Related posts about excel