Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Measuring Time in a user form syntax

Hi,
I'm stuck - I have a variable Starttime that I want to
check against Now(). If more than "00::02:30" elapses I
want to do something.

If Now-Starttime "00:02:30" then
do something
end if

What would the proper syntax be?

TIA

Martha
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Measuring Time in a user form syntax

Hi
have a look at:
http://www.cpearson.com/excel/ontime.htm

--
Regards
Frank Kabel
Frankfurt, Germany


Martha wrote:
Hi,
I'm stuck - I have a variable Starttime that I want to
check against Now(). If more than "00::02:30" elapses I
want to do something.

If Now-Starttime "00:02:30" then
do something
end if

What would the proper syntax be?

TIA

Martha

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Measuring Time in a user form syntax

Time is held as a fraction of one days, so 2:30 is 2.5 hours or 2.5/24. So
just use

If Now - StartTime (2.5/24) Then
...

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Martha" wrote in message
...
Hi,
I'm stuck - I have a variable Starttime that I want to
check against Now(). If more than "00::02:30" elapses I
want to do something.

If Now-Starttime "00:02:30" then
do something
end if

What would the proper syntax be?

TIA

Martha



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Measuring Time in a user form syntax

Thanks a bunch Bob,

I meant 2 1/2 minutes but the concept works like a
charm!!!
Thanks again,

MArtha
-----Original Message-----
Time is held as a fraction of one days, so 2:30 is 2.5

hours or 2.5/24. So
just use

If Now - StartTime (2.5/24) Then
...

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Martha" wrote in

message
...
Hi,
I'm stuck - I have a variable Starttime that I want to
check against Now(). If more than "00::02:30" elapses I
want to do something.

If Now-Starttime "00:02:30" then
do something
end if

What would the proper syntax be?

TIA

Martha



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Measuring Time in a user form syntax

And that is what you showed, my mistake. Glad it helped though.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Martha" wrote in message
...
Thanks a bunch Bob,

I meant 2 1/2 minutes but the concept works like a
charm!!!
Thanks again,

MArtha
-----Original Message-----
Time is held as a fraction of one days, so 2:30 is 2.5

hours or 2.5/24. So
just use

If Now - StartTime (2.5/24) Then
...

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Martha" wrote in

message
...
Hi,
I'm stuck - I have a variable Starttime that I want to
check against Now(). If more than "00::02:30" elapses I
want to do something.

If Now-Starttime "00:02:30" then
do something
end if

What would the proper syntax be?

TIA

Martha



.





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 do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
User Defined Function Syntax Ankur Excel Worksheet Functions 2 January 3rd 07 01:41 PM
Trying to select a specific range based on the time value of user form input Jitranijam New Users to Excel 8 November 15th 06 12:52 AM
VBA - Measuring Time -subsecond PShield Excel Discussion (Misc queries) 2 August 22nd 06 10:17 AM
User Form That Calculates Time Length and Fills In Other Informati C A Excel Worksheet Functions 0 August 1st 05 07:41 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"