Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
code need for time stamp
Hi, I need a code for a button so when I press it the time is shown in say
cell A1 and it will not change untill I press the button agian. Thank's inadvance, Barry. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
code need for time stamp
ActiveCell = Time 'Time only
ActiveCell = Date & " " & Time 'Date And Time HTH Die_Another_Day wildauk wrote: Hi, I need a code for a button so when I press it the time is shown in say cell A1 and it will not change untill I press the button agian. Thank's inadvance, Barry. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
code need for time stamp
Range("A1") = Time 'Time only
Range("A1") = Date & " " & Time 'Date And Time HTH Die_Another_Day wildauk wrote: Hi, I need a code for a button so when I press it the time is shown in say cell A1 and it will not change untill I press the button agian. Thank's inadvance, Barry. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
code need for time stamp
Try this...
public sub AddTimeStamp() activesheet.range("A1").value = now() end sub -- HTH... Jim Thomlinson "wildauk" wrote: Hi, I need a code for a button so when I press it the time is shown in say cell A1 and it will not change untill I press the button agian. Thank's inadvance, Barry. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
code need for time stamp
yes that worked thank you, is there any way I can only have the time without
the date? "Die_Another_Day" wrote: Range("A1") = Time 'Time only Range("A1") = Date & " " & Time 'Date And Time HTH Die_Another_Day wildauk wrote: Hi, I need a code for a button so when I press it the time is shown in say cell A1 and it will not change untill I press the button agian. Thank's inadvance, Barry. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
code need for time stamp
My preference is to always capture both date and time. If you want to you can
change the formatting of the cell to only display the time. If however later on you decide that you want both then you do not need to change the code, only to change the formatting of the cell. It gives you more flexibility to change your mind... -- HTH... Jim Thomlinson "wildauk" wrote: yes that worked thank you, is there any way I can only have the time without the date? "Die_Another_Day" wrote: Range("A1") = Time 'Time only Range("A1") = Date & " " & Time 'Date And Time HTH Die_Another_Day wildauk wrote: Hi, I need a code for a button so when I press it the time is shown in say cell A1 and it will not change untill I press the button agian. Thank's inadvance, Barry. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
code need for time stamp
See first line...
"Die_Another_Day" wrote: Range("A1") = Time 'Time only Die_Another_Day wildauk wrote: yes that worked thank you, is there any way I can only have the time without the date? "Die_Another_Day" wrote: Range("A1") = Time 'Time only Range("A1") = Date & " " & Time 'Date And Time HTH Die_Another_Day wildauk wrote: Hi, I need a code for a button so when I press it the time is shown in say cell A1 and it will not change untill I press the button agian. Thank's inadvance, Barry. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Time Stamp | Excel Discussion (Misc queries) | |||
Time Stamp | Excel Discussion (Misc queries) | |||
Need help with Time Stamp Code | Excel Programming | |||
time stamp a cell that doesn,t change when time stamping another | Excel Programming | |||
Time Stamp | Excel Discussion (Misc queries) |