Calculating hours using spin button

In Calc, I have several Time fields using the spin button.

They are attached to the cell.

The format of the cell is set to Time HH:MM:SS

When entering data in to the cell directly without the spin button, subtracting one cell from the other gives me a number of hours.

12:00:00 - 11:00:00 = 01:00:00

When referencing the cells where the spin buttons are for the formula, there is no result.

How do I write the formula or make the cell value work with 'time' spin buttons?

Properties: Time Field

             Spin Button............Yes

             Time Format..........13:45:00

             All others at default.

Win 7 Pro, X86, LibreOffice 5.2

Thanks

Paul

How do I get the spin button time results into a cell?

I borrowed the macro from Villeroy made 2009 (Thank you so much).

He has an attached formatted_controls.ods in the URL below that helps you understand whats going on.

See macro at https://forum.openoffice.org/en/forum/viewtopic.php?f=21&t=18714

I assumed that if you added a time/spin control attached to cell, it would have an associated macro to fulfill the function.

If there is supposed to be, let me know here.

There is a control named "DateField" writing to a cell named "DateField"
There is a control named "TimeField" writing to a cell named "TimeField"
There is a control named "CurrencyField" writing to a cell named
"CurrencyField"
etc.
Each control has a "Text Modified" event which calls the macro.
The macro checks if a cell has the same name as the calling control. If so,
it writes an appropriate cell value into that cell.

This is a dirty hack. It applies to single cells only, e.g. you can't fill
columns of time data with this.
I always recommend databases. Most spreadsheet users try to simulate
databases in spreadsheets. Spreadsheet cells are NOT the normal target of
form controls. The controls are made for database records where one control
applies to all records of a whole column.