#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAI DAI is offline
external usenet poster
 
Posts: 8
Default Time Stamp

Hello,

I have created a macro to give me start and finish times with the click of a
button,

Function my_now()
Application.Volatile (False)
my_now = Now
End Function

However every now and the all entries are recalculated. (It only happens when
im not looking)

I was under the impression that with the (Application.Volatile (False)) this
could not happen.

Any ideas would be welcome.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Time Stamp

Just leave the line with Application.Volatile out

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"DAI" <u29573@uwe wrote in message news:69d229a7b7d62@uwe...
| Hello,
|
| I have created a macro to give me start and finish times with the click of a
| button,
|
| Function my_now()
| Application.Volatile (False)
| my_now = Now
| End Function
|
| However every now and the all entries are recalculated. (It only happens when
| im not looking)
|
| I was under the impression that with the (Application.Volatile (False)) this
| could not happen.
|
| Any ideas would be welcome.
|


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAI DAI is offline
external usenet poster
 
Posts: 8
Default Time Stamp

Niek,

If I did that excel would recalculate the function every time i open the
sheet. Which defeats the purpose of time stamping.


Niek Otten wrote:
Just leave the line with Application.Volatile out

| Hello,
|
[quoted text clipped - 13 lines]
|
| Any ideas would be welcome.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DAI DAI is offline
external usenet poster
 
Posts: 8
Default Time Stamp

Don,

I have limited kowledge of VBA, how woulld I use the instructions you have
given. If you could give a step by step that would be great.


Thank You

Don Guillett wrote:
use a regular sub to click on
sub datestamp()
activecell=date
'or
'range("a2")=date
end sub

Hello,

[quoted text clipped - 16 lines]

Any ideas would be welcome.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Time Stamp

If you are clicking a button use a macro to insert a static time and not a
Function which can/will change.

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "h:mm:ss AM/PM")
End Sub


Gord Dibben MS Excel MVP

On Sat, 25 Nov 2006 15:43:09 GMT, "DAI" <u29573@uwe wrote:

Hello,

I have created a macro to give me start and finish times with the click of a
button,

Function my_now()
Application.Volatile (False)
my_now = Now
End Function

However every now and the all entries are recalculated. (It only happens when
im not looking)

I was under the impression that with the (Application.Volatile (False)) this
could not happen.

Any ideas would be welcome.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Time Stamp

Gord,

That works well althogh I have canged the format of the date and time.

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "dd/mm/yyyy hh:mm")
End Sub


Thank You


Gord Dibben wrote:
If you are clicking a button use a macro to insert a static time and not a
Function which can/will change.

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "h:mm:ss AM/PM")
End Sub

Gord Dibben MS Excel MVP

Hello,

[quoted text clipped - 13 lines]

Any ideas would be welcome.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200611/1

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Time Stamp

Gord,

That works well although I have canged the format of the date and time.

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "dd/mm/yyyy hh:mm")
End Sub


Thank You


Gord Dibben wrote:
If you are clicking a button use a macro to insert a static time and not a
Function which can/will change.

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "h:mm:ss AM/PM")
End Sub

Gord Dibben MS Excel MVP

Hello,

[quoted text clipped - 13 lines]

Any ideas would be welcome.


--
Message posted via http://www.officekb.com

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Time Stamp

Thanks for the feedback.

Alternate non-vba method to enter static date/time in a cell

CTRL + ;..let go of CTRL, hit spacebar then CTRL + SHIFT + ;

Format to suit.


Gord

On Mon, 27 Nov 2006 08:15:39 GMT, "DAI via OfficeKB.com" <u29573@uwe wrote:

Gord,

That works well althogh I have canged the format of the date and time.

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "dd/mm/yyyy hh:mm")
End Sub


Thank You


Gord Dibben wrote:
If you are clicking a button use a macro to insert a static time and not a
Function which can/will change.

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "h:mm:ss AM/PM")
End Sub

Gord Dibben MS Excel MVP

Hello,

[quoted text clipped - 13 lines]

Any ideas would be welcome.


Gord Dibben MS Excel MVP
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
Date Time Stamp Dilemna [email protected] Excel Discussion (Misc queries) 9 November 1st 06 09:10 PM
Time and Date stamp - Pivot Chart Bemidji Excel Discussion (Misc queries) 6 October 25th 06 02:50 PM
Making a time stamp Rick New Users to Excel 3 October 21st 06 02:37 AM
How to display seconds on time stamp? uosam Excel Worksheet Functions 1 February 28th 06 09:05 PM
How do i automate a static time stamp? Gavin Taylor Excel Discussion (Misc queries) 1 December 31st 05 02:08 PM


All times are GMT +1. The time now is 09:18 PM.

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

About Us

"It's about Microsoft Excel"