View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
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