Unload userform after x seconds for a quiz?

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
790
Office Version
  1. 365
Platform
  1. Windows
Hi guys, can I unload a userform if the answer is not provided in a text box within 5 seconds?

VBA Code:
Application.OnTime Now + TimeValue("00:00:05"), "KillForm1"

That's some code I've found, but surely the code will just hang on that for 5 seconds, right? I want to have an image show up in the userform. If the user guesses the correct subject, then it moves on to the next image. They have 5 seconds to guess each image.

The part I'm struggling with is how to time it in the background. Thanks!
 
Lovely jubbly - this code worked and now when my users complete the quiz, the sheet reveals a clue for the next quiz. Thanks so much!!
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,215,756
Messages
6,126,692
Members
449,330
Latest member
ThatGuyCap

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top