mercredi 27 mars 2019

Very green VBA user, everything below 2nd line works, but how do I make above it work?

I have made a test in Excel for my cousin; right now if you get the answer correct then you have to press a button for the next question, but I would like the macro to show "correct" for 2 seconds then move on to the next question without having to press a button. Please help

I've tried below, it used to be regular button click macro, but i've tried to change it and it won't run

Sub answer_correct()

If K11.Value == "Correct!" Then

Range("A1") = WorksheetFunction.RandBetween(1, 65)

Range("I11").Cells.ClearContents

ActiveSheet.Range("I11").Select

Range("F18").Value = Range("F18").Value + 1

End If

End Sub

I get syntax error, I expect the counter to go up by 1 and the question to reset

Aucun commentaire:

Enregistrer un commentaire