ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Now() Format (https://www.excelbanter.com/excel-discussion-misc-queries/145289-now-format.html)

K1KKKA

Now() Format
 
Hi HYCH

Am using the =now() to display time in a cell,


Question = is there anyway to keep it current, other than when a cell
is selected and has data or other info placed into it?


Steve


JE McGimpsey

Now() Format
 
Since NOW() is a volatile function, it will recalculate whenever the
sheet is calculated, so you can use F9 to update it.

Otherwise you'd need to call an OnTime macro to continually recalculate
(or better, put the time directly in the cell).



In article .com,
K1KKKA wrote:

Hi HYCH

Am using the =now() to display time in a cell,


Question = is there anyway to keep it current, other than when a cell
is selected and has data or other info placed into it?


Steve


K1KKKA

Now() Format
 
On Jun 5, 9:53 pm, JE McGimpsey wrote:
Since NOW() is a volatile function, it will recalculate whenever the
sheet is calculated, so you can use F9 to update it.

Otherwise you'd need to call an OnTime macro to continually recalculate
(or better, put the time directly in the cell).

In article .com,



K1KKKA wrote:
Hi HYCH


Am using the =now() to display time in a cell,


Question = is there anyway to keep it current, other than when a cell
is selected and has data or other info placed into it?


Steve- Hide quoted text -


- Show quoted text -


Thanks JE,

Guessed that would be the case,

Appreciate your confirmation


Steve


Rick Rothstein \(MVP - VB\)

Now() Format
 
Am using the =now() to display time in a cell,

Question = is there anyway to keep it current, other than when
a cell is selected and has data or other info placed into it?


You might consider adding a Microsoft Status Bar Control to your worksheet,
configure it with 2 panels and set their styles to 6-sbrDate and 5-sbrTime.
The time and date will automatically update with no intervention required.
Here is how I did this on my test worksheet (using Excel 2003). If you don't
already have the Visual Basic Toolbar visible, make it so (select
View/Toolbars/VisualBasic from Excel's menu). Then, click the icon on that
toolbar that puts it into Design Mode; then click the icon for the Control
Toolbox. Now click the bottom right icon on the Toolbox (it's tooltip says
"More Controls"). Click on the Microsoft Status Bar Control 6.0 item in the
list to activate it and then click/drag an area on the worksheet to place
the Status Bar there. I would delay resizing it until you add the panels
with the date and time (each of which will have to be resized according to
the font being used). Okay, double-click on the Status Bar you just placed
(make sure you are still in Design Mode). That will take you to the VB
editor with the Status Bar control already selected in the Properties Box.
Click on the (Custom) entry in the Properties Box and then on the button
with 3 dots that appears. This take you to the Property Page for the
control. Click on the Panels tab and then click on the Insert Panel button
to add 2 panels on the Status Bar. Set the Index to 1 and change the Style
drop down to 6-sbrDate. Now set the Index to 2 and change the Style drop
down to 5-sbrTime. At this point, you will have play around with the
Minimum/Actual Width fields for each panel to size them to display all of
their text. Once you have done that, you can resize the actual Status Bar
back on the worksheet to at least a width large enough to display both
panels. For aesthetics, you can get rid of the borders for each panel by
changing their Bevel properties to 0-sbrNoBevel. Finally, click the VB icon
you originally clicked to exit Design Mode. The Status Bar should continue
to update itself automatically from here on out.

Rick


K1KKKA

Now() Format
 
On Jun 5, 10:44 pm, "Rick Rothstein \(MVP - VB\)"
wrote:
Am using the =now() to display time in a cell,


Question = is there anyway to keep it current, other than when
a cell is selected and has data or other info placed into it?


You might consider adding a Microsoft Status Bar Control to your worksheet,
configure it with 2 panels and set their styles to 6-sbrDate and 5-sbrTime.
The time and date will automatically update with no intervention required.
Here is how I did this on my test worksheet (using Excel 2003). If you don't
already have the Visual Basic Toolbar visible, make it so (select
View/Toolbars/VisualBasic from Excel's menu). Then, click the icon on that
toolbar that puts it into Design Mode; then click the icon for the Control
Toolbox. Now click the bottom right icon on the Toolbox (it's tooltip says
"More Controls"). Click on the Microsoft Status Bar Control 6.0 item in the
list to activate it and then click/drag an area on the worksheet to place
the Status Bar there. I would delay resizing it until you add the panels
with the date and time (each of which will have to be resized according to
the font being used). Okay, double-click on the Status Bar you just placed
(make sure you are still in Design Mode). That will take you to the VB
editor with the Status Bar control already selected in the Properties Box.
Click on the (Custom) entry in the Properties Box and then on the button
with 3 dots that appears. This take you to the Property Page for the
control. Click on the Panels tab and then click on the Insert Panel button
to add 2 panels on the Status Bar. Set the Index to 1 and change the Style
drop down to 6-sbrDate. Now set the Index to 2 and change the Style drop
down to 5-sbrTime. At this point, you will have play around with the
Minimum/Actual Width fields for each panel to size them to display all of
their text. Once you have done that, you can resize the actual Status Bar
back on the worksheet to at least a width large enough to display both
panels. For aesthetics, you can get rid of the borders for each panel by
changing their Bevel properties to 0-sbrNoBevel. Finally, click the VB icon
you originally clicked to exit Design Mode. The Status Bar should continue
to update itself automatically from here on out.

Rick


WOW< Thanks Rick,


Not sure if this is what i am looking for as i need the time to be
referenced in a macro later to decide whhat form to show


See post : Time issue with Day Format !!


But thanks again


Steve




Rick Rothstein \(MVP - VB\)

Now() Format
 
Not sure if this is what i am looking for as i need the time to be
referenced in a macro later to decide whhat form to show


The time it is displaying is the system time... you can use the Time or Now
function to get it.

Rick


K1KKKA

Now() Format
 
On Jun 5, 11:09 pm, "Rick Rothstein \(MVP - VB\)"
wrote:
Not sure if this is what i am looking for as i need the time to be
referenced in a macro later to decide whhat form to show


The time it is displaying is the system time... you can use the Time or Now
function to get it.

Rick


ok, thanks will try this then :)


Steve



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

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