Hello!
This macro should help you to insert date and time stamp as a text
string. Assign it to a certain key combination or add to tool bar as a
button. I use this approach for time studies in forestry.
There are also other similar macros available in the internet. I don't
remember, where I took this one.
Andis
REM ***** BASIC *****
Sub InsertNowString
'inserts the present value of now() as a string and applies appropriate
style
Dim oDoc as Object, oCell as Object
oDoc = ThisComponent : oCell = oDoc.CurrentSelection
If NOT oCell.supportsService( "com.sun.star.sheet.SheetCell" ) Then :
Exit Sub : End If
oCell.FormulaLocal = cStr( Now() )
If oDoc.StyleFamilies.CellStyles.hasByName( "Time" ) Then
oCell.CellStyle = "Time" : End If
End Sub
George Ekman wrote:
I am using Openoffice 2.3.1. I need to be able to load, save and calculate
part of a spread sheet, also I need to be able to put time stamps from the
computer clock in cells. Both start time and finish time, then calculate time
spent on a project, also time for the day for each employee. How do I do this
or can Calc be made to do this? If you need a sample of my spread sheet please
feel free to ask.
George Ekman
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]