ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   A problem with the function "NOW" (https://www.excelbanter.com/excel-worksheet-functions/158102-problem-function-now.html)

Matthias Dhondt

A problem with the function "NOW"
 
Hi all,

We made a macro, to show the current time in the cell "A1", we used the
function Now()-Today()

When you adapt something in Excel, the time in cell "A1" will automatically
be changed in the current time.

What do we have to change in the macro, that the time don't adapt anymore?

greeting Matthias



Duke Carey

A problem with the function "NOW"
 
The easiest way to put the current time into a cell so that it doesn't update
is to select the cell and press Ctrl-Shift-:


"Matthias Dhondt" wrote:

Hi all,

We made a macro, to show the current time in the cell "A1", we used the
function Now()-Today()

When you adapt something in Excel, the time in cell "A1" will automatically
be changed in the current time.

What do we have to change in the macro, that the time don't adapt anymore?

greeting Matthias




David Biddulph[_2_]

A problem with the function "NOW"
 
If you want to put current time into a cell, use Control Shift Colon.
--
David Biddulph

"Matthias Dhondt" wrote in message
...
Hi all,

We made a macro, to show the current time in the cell "A1", we used the
function Now()-Today()

When you adapt something in Excel, the time in cell "A1" will
automatically be changed in the current time.

What do we have to change in the macro, that the time don't adapt anymore?

greeting Matthias





Gord Dibben

A problem with the function "NOW"
 
Post the macro you use to enter the time.

ActiveCell.Value = Format(Now(), "h:mm:ss AM/PM") will enter a static time.

Perhaps your macro employs event code which updates the time when something
changes.


Gord Dibben MS Excel MVP

On Thu, 13 Sep 2007 12:48:21 +0200, "Matthias Dhondt"
wrote:

Hi all,

We made a macro, to show the current time in the cell "A1", we used the
function Now()-Today()

When you adapt something in Excel, the time in cell "A1" will automatically
be changed in the current time.

What do we have to change in the macro, that the time don't adapt anymore?

greeting Matthias




All times are GMT +1. The time now is 01:07 PM.

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