[Solved] Push Button Timer

Creating a macro - Writing a Script - Using the API

[Solved] Push Button Timer

Postby kendall_borg » Thu Sep 09, 2010 12:40 am

I understand i would need a Macro to imbed a 'button' into a sheet.
how would i go about setting up said button to act as a 'start/stop' button for a timer? also, how would i even creat the timer itself?

For example: i would like to push the button at the top of the sheet to start the timer, deal with what i had to do.. then push the button again to stop the timer.
Last edited by kendall_borg on Thu Sep 09, 2010 4:36 am, edited 1 time in total.
Office 3.2.1
Windows 7 x64
kendall_borg
 
Posts: 2
Joined: Thu Sep 09, 2010 12:32 am

Re: Push Button Timer

Postby Villeroy » Thu Sep 09, 2010 1:01 am

There are plenty of macros which put a time stamp into some cell.
Create a push button which can be toggled on/off
Put a time stamp in one cell when the button is on (pushed) and another time stamp into another cell when the button is off.
A third cel with formula =Cell2-Cell1 formatted as [HH]:MM:SS gives.00 the time between the two stamps.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27200
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Push Button Timer

Postby Charlie Young » Thu Sep 09, 2010 1:29 am

kendall_borg wrote:I understand i would need a Macro to imbed a 'button' into a sheet.
how would i go about setting up said button to act as a 'start/stop' button for a timer? also, how would i even creat the timer itself?

For example: i would like to push the button at the top of the sheet to start the timer, deal with what i had to do.. then push the button again to stop the timer.



You asked for it. The attached file does what you want and more.
Attachments
Stopwatch.ods
Clock/Stopwatch
(81.22 KiB) Downloaded 706 times
Apache OpenOffice 4.1.1
Windows XP
User avatar
Charlie Young
Volunteer
 
Posts: 1559
Joined: Fri May 14, 2010 1:07 am

Re: Push Button Timer

Postby kendall_borg » Thu Sep 09, 2010 4:34 am

Thanks Villeroy... DUH, dont know why i didnt think about having time stamps... I was just trying to make things WAY too complicated.
Office 3.2.1
Windows 7 x64
kendall_borg
 
Posts: 2
Joined: Thu Sep 09, 2010 12:32 am


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests