Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Different syntax for Application.Wait

TimeSerial - Returns a Variant (Date) containing the time for a specific
hour, minute, and second

TimeValue - Returns a Variant (Date) containing the time. The required time
argument is normally a string expression representing a time from 0:00:00
(12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.), inclusive. However, time can
also be any expression that represents a time in that range.

Just taken from Help, which does what it says on the packet.

The third is totally redundant IMO. Why break now down into its constituent
parts, to just re-assemble them.

As to performance, you won't notice it, and better is subjective, so use
what is appropriate for your application.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Desert Piranha"
<Desert.Piranha.203yym_1134695405.1837@excelforu m-nospam.com wrote in
message news:Desert.Piranha.203yym_1134695405.1837@excelfo rum-nospam.com...

Hi all,

Of these three lines of Syntax:
What is the difference from Serial vs Value?
What are the differencs in preformance?
Which is better and why?

Application.Wait Now + TimeValue("00:00:10")

Application.Wait Now + TimeSerial(0, 0, 10)

Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) +
10)


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile:

http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=494006



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Different syntax for Application.Wait


Hi all,

Of these three lines of Syntax:
What is the difference from Serial vs Value?
What are the differencs in preformance?
Which is better and why?

Application.Wait Now + TimeValue("00:00:10")

Application.Wait Now + TimeSerial(0, 0, 10)

Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) +
10)


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=494006

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Different syntax for Application.Wait


Hi Bob,
Thx for this,
I did think the third one was kinda screwey.
It looks like i have a choice between:
Application.Wait Now + TimeValue("00:00:10")
Application.Wait Now + TimeSerial(0, 0, 10)
Looks like the Serial would be just a tad easier to work with.
So if the both do the same thing than that will be my choice.
Thx Bob
Dave
Bob Phillips Wrote:
TimeSerial - Returns a Variant (Date) containing the time for a
specific
hour, minute, and second

TimeValue - Returns a Variant (Date) containing the time. The required
time
argument is normally a string expression representing a time from
0:00:00
(12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.), inclusive. However, time
can
also be any expression that represents a time in that range.

Just taken from Help, which does what it says on the packet.

The third is totally redundant IMO. Why break now down into its
constituent
parts, to just re-assemble them.

As to performance, you won't notice it, and better is subjective, so
use
what is appropriate for your application.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Desert Piranha"
<Desert.Piranha.203yym_1134695405.1837@excelforu m-nospam.com wrote in
message
news:Desert.Piranha.203yym_1134695405.1837@excelfo rum-nospam.com...

Hi all,

Of these three lines of Syntax:
What is the difference from Serial vs Value?
What are the differencs in preformance?
Which is better and why?

Application.Wait Now + TimeValue("00:00:10")

Application.Wait Now + TimeSerial(0, 0, 10)

Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now())

+
10)


--
Desert Piranha



------------------------------------------------------------------------
Desert Piranha's Profile:

http://www.excelforum.com/member.php...o&userid=28934
View this thread:

http://www.excelforum.com/showthread...hreadid=494006



--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=494006

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Different syntax for Application.Wait

I tend to use TimeValue as you input time in the same way as you do in a
spreadsheet, but that is just a personal thing.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Desert Piranha"
<Desert.Piranha.204azz_1134711002.4002@excelforu m-nospam.com wrote in
message news:Desert.Piranha.204azz_1134711002.4002@excelfo rum-nospam.com...

Hi Bob,
Thx for this,
I did think the third one was kinda screwey.
It looks like i have a choice between:
Application.Wait Now + TimeValue("00:00:10")
Application.Wait Now + TimeSerial(0, 0, 10)
Looks like the Serial would be just a tad easier to work with.
So if the both do the same thing than that will be my choice.
Thx Bob
Dave
Bob Phillips Wrote:
TimeSerial - Returns a Variant (Date) containing the time for a
specific
hour, minute, and second

TimeValue - Returns a Variant (Date) containing the time. The required
time
argument is normally a string expression representing a time from
0:00:00
(12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.), inclusive. However, time
can
also be any expression that represents a time in that range.

Just taken from Help, which does what it says on the packet.

The third is totally redundant IMO. Why break now down into its
constituent
parts, to just re-assemble them.

As to performance, you won't notice it, and better is subjective, so
use
what is appropriate for your application.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Desert Piranha"
<Desert.Piranha.203yym_1134695405.1837@excelforu m-nospam.com wrote in
message
news:Desert.Piranha.203yym_1134695405.1837@excelfo rum-nospam.com...

Hi all,

Of these three lines of Syntax:
What is the difference from Serial vs Value?
What are the differencs in preformance?
Which is better and why?

Application.Wait Now + TimeValue("00:00:10")

Application.Wait Now + TimeSerial(0, 0, 10)

Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now())

+
10)


--
Desert Piranha



------------------------------------------------------------------------
Desert Piranha's Profile:

http://www.excelforum.com/member.php...o&userid=28934
View this thread:

http://www.excelforum.com/showthread...hreadid=494006



--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile:

http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=494006



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
Application.wait... won't! Peter Rooney Excel Programming 12 November 17th 06 04:31 AM
application.wait help flowtester Excel Programming 10 December 4th 05 03:47 PM
application.worksheetfunction. <function (syntax) Peter[_21_] Excel Programming 3 September 1st 04 08:24 PM
Application.WorksheetFunction.Index syntax LJones[_2_] Excel Programming 3 August 4th 04 12:13 PM
Application.wait & Blinking Connector Tom Rudski[_2_] Excel Programming 1 March 6th 04 05:36 PM


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