ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Time Stamp (https://www.excelbanter.com/excel-worksheet-functions/219236-time-stamp.html)

sara

Time Stamp
 
Hi there

Is it possibe to create a macro that I can access from a cell phone (from
QuickOffice) to place time stamp (time only) into any cell within a workbook.

I need to ensure that this only updates one cell, and does not change
previous time stamps entered using the same method.

Gary''s Student

Time Stamp
 
Here are two macros. Let's assume that you have a spreadsheet that can be
opened either on a computer or by calling the computer. I further assume
that the control of Excel over the phone is limited. If you open the
spreadsheet over the phone, the macros will:

1. immediately record the time in column A of Sheet1
2. the recording is completely automatic
3. the next available cell in the column is used so no data is overwritten
4. after a ten second wait, the spreadhseet is saved and Excel is closed

If you open the spreadsheet on the computer rather than over the phone, you
have ten seconds to enter a value in cell B1.
Once a value has been placed in cell B1, the ten second count-down is
suspended and you have full comtrol.

Enter the following Event macro in the workbook code area:

Private Sub Workbook_Open()
fmt = "[$-F400]h:mm:ss AM/PM"
Sheets("Sheet1").Activate
If IsEmpty(Range("A1")) Then
Range("A1").Value = Now - Date
Range("A1").NumberFormat = fmt
Call leaving
Else
n = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(n, 1).Value = Now - Date
Cells(n, 1).NumberFormat = "[$-F400]h:mm:ss AM/PM"
Call leaving
End If
End Sub


Enter the following macro in a standard module:

Sub leaving()
' gsnuxx
whn = Now + TimeSerial(0, 0, 10)
While Now < whn
DoEvents
If Range("B1").Value < "" Then
Exit Sub
End If
Wend
ActiveWorkbook.Save
Application.Quit
End Sub

--
Gary''s Student - gsnu200831


"Sara" wrote:

Hi there

Is it possibe to create a macro that I can access from a cell phone (from
QuickOffice) to place time stamp (time only) into any cell within a workbook.

I need to ensure that this only updates one cell, and does not change
previous time stamps entered using the same method.



All times are GMT +1. The time now is 10:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com