#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
alexfthe
 
Posts: n/a
Default Timestamp Macro

I am trying to simplify a timetable to mimic several functions of a
stopwatch. Currently I have the macro below:

Sub Timestamp()
'
' Timestamp Macro
' Macro recorded 3/9/2006 by Alex
'
' Keyboard Shortcut: Ctrl+t
'
Dim sAddress As String
sAddress = ActiveSheet.Shapes(Application.Caller).TopLeftCell .Address(0,
0)
Range(sAddress).Select
ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Selection.NumberFormat = "hh:mm:ss"
ActiveSheet.Shapes(Application.Caller).Delete

End Sub


I want to get this operating on a single key instead of clicking a different
icon for each cell...

Is there any way to attach it to a cell itself rather than the image? (to
allow the macro to run on striking enter)

Or

Is there a way to allow the application caller to regenerate in a remote
location and prepare to perform the action on the next cell down? (would
create a large alarm clock icon in the corner and have it insert a timestamp
in a cell, then clicking the icon again inserts the timestamp one cell below
the previous timestamp and so on...)

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rich Mcc
 
Posts: n/a
Default Timestamp Macro

try this , hope it helps

change "b" in the 2 nextfree statments to the coloum number where you want
to enter the time



Sub enter_time()

Dim nextfree As String
timerow = 1
nextfree = "b" & timerow

Do While Range(nextfree) < 0
timerow = timerow + 1
nextfree = "b" & timerow
Loop

Range(nextfree).Select
ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Selection.NumberFormat = "hh:mm"


"alexfthe" wrote:

I am trying to simplify a timetable to mimic several functions of a
stopwatch. Currently I have the macro below:

Sub Timestamp()
'
' Timestamp Macro
' Macro recorded 3/9/2006 by Alex
'
' Keyboard Shortcut: Ctrl+t
'
Dim sAddress As String
sAddress = ActiveSheet.Shapes(Application.Caller).TopLeftCell .Address(0,
0)
Range(sAddress).Select
ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Selection.NumberFormat = "hh:mm:ss"
ActiveSheet.Shapes(Application.Caller).Delete

End Sub


I want to get this operating on a single key instead of clicking a different
icon for each cell...

Is there any way to attach it to a cell itself rather than the image? (to
allow the macro to run on striking enter)

Or

Is there a way to allow the application caller to regenerate in a remote
location and prepare to perform the action on the next cell down? (would
create a large alarm clock icon in the corner and have it insert a timestamp
in a cell, then clicking the icon again inserts the timestamp one cell below
the previous timestamp and so on...)

Thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 04:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"