Time Stamp

S

Sara

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.
 
G

Gary''s Student

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Creating custom stamps in .pdf Adobe documents 1
separating date and time 5
time stamp 2
making NT user/login user appear in a cell 1
Time Stamp formula 5
time stamp 4
time/date stamp 2
Time/Date Stamp 3

Top