Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timer Control 2

Status
Not open for further replies.

anastasia

Programmer
Dec 13, 2000
111
GB
I was wondering if is is possible to use the Timer Control in MS Word. If this is possible how do i install it into Word with the rest of the controls?.

I am looking to have the application count down from 20 mins to O, when the user clicks a start button?.

Thanks.
 
MS Word and Excel use the OnTime method. The following is from MS Word VBA Help

OnTime Method Example

This example runs the macro named "MyMacro" in the current module at 3:55 P.M.

Application.OnTime When:="15:55:00", Name:="MyMacro"
This example runs the macro named "Macro1" 15 seconds from the time the example is run. The macro name includes the project and module name.

Application.OnTime When:=Now + TimeValue("00:00:15"), _
Name:="Project1.Module1.Macro1"
This example runs the macro named "Start" at 1:30 P.M. The macro name includes the project and module name.

Application.OnTime When:=TimeValue("1:30 pm"), _
Name:="VBAProj.MyModule.Start"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top