#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default time box

I want to make a box which is in military time tied back to a range of cells.
Can it be done and how could it be easily done. Thanks for help
--
ED
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default time box

Four steps:

1. insert this User Defined Function:

Function gmt() As Date
Application.Volatile
dot = "."
Set Serve = GetObject("winmgmts:\\" & dot & "\root\cimv2")
Set Zones = Serve.ExecQuery("Select * From Win32_TimeZone")

For Each Zone In Zones
intTimeZoneBias = Zone.Bias
intDayLightBias = Zone.DaylightBias
Next

gmt = Now() - (intTimeZoneBias - intDayLightBias) / (60 * 24)

End Function

2. in cell A1, enter:

=gmt()

3. put a rectangle on your worksheet using the Drawing toolbar

4. click on the rectangle to select it and then click in the formula bar and
enter:

=A1
--
Gary''s Student - gsnu200796


"Ed" wrote:

I want to make a box which is in military time tied back to a range of cells.
Can it be done and how could it be easily done. Thanks for help
--
ED

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default time box

Right-click on the cell you want to be your 'box'.
Select 'Format Cells...' from the menu.
Select 'Time'
Select the military time format you want.
--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown


"Ed" wrote:

I want to make a box which is in military time tied back to a range of cells.
Can it be done and how could it be easily done. Thanks for help
--
ED

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 calculations for Scheduled Time vs. Actual Time Worked The Caterer Excel Discussion (Misc queries) 1 November 29th 09 08:08 AM
straight time, time and a half, and double time Jeremy Excel Discussion (Misc queries) 3 September 23rd 08 09:03 PM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
Comparing 2 files on date/time stamp, and based time difference do a subroutine [email protected] Excel Programming 1 September 28th 07 03:53 AM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM


All times are GMT +1. The time now is 06:14 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"