Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Time VBA or NOW function


Good Morning All,

I'm currently using the below VBA provided to someone in an earlier thread
by Rick (great idea by the way).

My question is - would there be a way to have this set up to accommodate
different time zones? I use it in a current spreadsheet to show real time
that continually increments, but I also need it to calculate and show the
real times for different time zones. I have location in Australia, Japan and
Korea that I'm also looking to display with their current times.

I had tried this original with the NOW function (which I know does not
update until you press F9 or open the sheet), but that function would not
allow me to add or subtract hours to it to display the needed previously
mentioned countries in real time.

Thank you for your review and any thoughts or help is greatly appreciated

- Jenny B.
__________________________________________________ ______

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


Was this post helpful to you?

Why should I

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Time VBA or NOW function

I'm not aware of the time function/macro given you but if it shows local time
then in another cell add/subtract the necessary hours from that to display
other time zones.

Mike

"Jenny B." wrote:


Good Morning All,

I'm currently using the below VBA provided to someone in an earlier thread
by Rick (great idea by the way).

My question is - would there be a way to have this set up to accommodate
different time zones? I use it in a current spreadsheet to show real time
that continually increments, but I also need it to calculate and show the
real times for different time zones. I have location in Australia, Japan and
Korea that I'm also looking to display with their current times.

I had tried this original with the NOW function (which I know does not
update until you press F9 or open the sheet), but that function would not
allow me to add or subtract hours to it to display the needed previously
mentioned countries in real time.

Thank you for your review and any thoughts or help is greatly appreciated

- Jenny B.
__________________________________________________ ______

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


Was this post helpful to you?

Why should I

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Time VBA or NOW function

Good Morning Mike,

I am unable to use a simple cell - addition formula since this is a VBA
generated box (shape) that holds the time value not a cell.

The other method I used perviously - NOW() - is an actual formula that goes
in a cell. Unfortunately, It would not allow me to construct a simple
formula to add time to it to give me a different time value (gave me an error
and said I was using a "circular reference and that's why I went with the VBA
method instead).

Thanks for your thoughts and any additional information - Jenny B.


*** P.S. I'm not looking for static time. These will all increment just
like the VBA box, only they will show the different values for each country
(i.e; Australia will be 8 hrs ahead ...etc.)

"Jenny B." wrote:


Good Morning All,

I'm currently using the below VBA provided to someone in an earlier thread
by Rick (great idea by the way).

My question is - would there be a way to have this set up to accommodate
different time zones? I use it in a current spreadsheet to show real time
that continually increments, but I also need it to calculate and show the
real times for different time zones. I have location in Australia, Japan and
Korea that I'm also looking to display with their current times.

I had tried this original with the NOW function (which I know does not
update until you press F9 or open the sheet), but that function would not
allow me to add or subtract hours to it to display the needed previously
mentioned countries in real time.

Thank you for your review and any thoughts or help is greatly appreciated

- Jenny B.
__________________________________________________ ______

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


Was this post helpful to you?

Why should I

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
Time function L_n_da Excel Worksheet Functions 1 February 1st 06 09:02 PM
Time function Tim Excel Worksheet Functions 1 December 12th 05 02:53 PM
Function to convert Time String to Time Andibevan Excel Worksheet Functions 6 August 19th 05 01:19 PM
Time Function Donovan Excel Discussion (Misc queries) 2 June 3rd 05 06:41 PM
Help with Time Function LKP Excel Worksheet Functions 1 January 5th 05 03:33 PM


All times are GMT +1. The time now is 03:39 AM.

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"