Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Time durations in excel and VB

I'm using VBA for excel. A formula in a cell calculates the timespan between
two date/times in minutes. I need to extract this number from excel into VB,
but it always converts the number to the date/time serial number! any help
appreciated - this should be easy!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Time durations in excel and VB

Time is held in Excel as a fractional part of 1 day. So if you declare a
variable as Double, you should be able to get it quite easily as a number

Dim myNum As Double
myNum = Range("D1").Value
MsgBox myNum


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Owen" wrote in message
...
I'm using VBA for excel. A formula in a cell calculates the timespan

between
two date/times in minutes. I need to extract this number from excel into

VB,
but it always converts the number to the date/time serial number! any help
appreciated - this should be easy!



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
How enter time DURATIONS mm:ss (not clock times), then sum? Roger D Excel Worksheet Functions 4 April 4th 23 10:18 AM
Adding time durations Foghat Excel Discussion (Misc queries) 2 October 14th 08 11:58 AM
formula for negative time durations DAZA Excel Worksheet Functions 1 April 16th 08 05:45 PM
Adding up time durations? Eric Excel Discussion (Misc queries) 1 November 20th 06 09:52 PM
How do I calculate time durations over numerous dates MBubier Excel Worksheet Functions 4 November 30th 05 08:08 PM


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