PDA

View Full Version : Display DownTimer in the UserForm & at the same time User should work with UserForm ?



sj72053
07-11-2008, 02:15 AM
Hi,
I wrote a Excel Macro for a Quiz Program, the requirement is -> "After we Run the Macro Exactly after one hour the Macro Should Close Automatically"

i.e., as soon as i open the Excel Macro it should display a Downtime Timer starting form 60 Minutes at the same time user should able to answer the Questions and After completing 1hour(60 Minutes) the Macro Should display a Message and Close the Macro Program Automatically,

how can we do this... ? Can some one please help me on this..


---> Please refer to the attached Macro

Bob Phillips
07-11-2008, 03:10 AM
.

sj72053
07-11-2008, 03:41 AM
Hi xld,
Thank you for reponding to my Problem, but when i tried to Run the Macro Program i am getting "Compile error: Con't find project of Library"

Please help me how to resolve this problem ...

Please refer to the attached Screenshot->>>

Bob Phillips
07-11-2008, 03:57 AM
Go to the VBIDE, Tools>References, and see if any items are marked as MISSING.

david000
07-11-2008, 09:49 PM
Public Sub CountDown()

UF_StartExam.TextBox1.Text = Application.WorksheetFunction.Text(CountDownTime, "hh:mm:ss") '<<< this
CountDownTime = CountDownTime - TimeInc
If CountDownTime > 0 Then

Application.OnTime Now + TimeInc, "CountDown"
Else

Unload UF_StartExam
End If
End Sub