Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 14th, 2012, 04:36 PM
Authorized User
 
Join Date: Jan 2012
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default elapsed time

How would I take the elapse time (not timer) and if the difference is less than 1 hour then display a message stated you have "xx" minutes left until 1 hour is up.
Ex:
Lets say the two times are 17:30-17:00=.5 hour
This is less than 1 hour so the message would state you have 30 minutes left.

Can this be done all within vba . If so how? Thanks.
 
Old August 19th, 2012, 10:49 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

You can use DateDiff function in VBA to find the difference between two date values (time included) and specify the same

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Shift time in minus time out lechalas Beginning VB 6 1 August 11th, 2008 01:56 PM
The timeout period elapsed prior to obtaining a co abinashpatra ASP.NET 1.0 and 1.1 Professional 0 July 4th, 2008 12:17 AM
Need to calculate elapsed time. RayL Access VBA 4 May 24th, 2007 12:04 PM
Elapsed Time Brendan Bartley Access 1 August 7th, 2006 01:50 AM
Calculating Time elapsed on form load Brendan Bartley Access 0 June 21st, 2005 09:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.