Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Application.wait... won't! | Excel Programming | |||
application.wait help | Excel Programming | |||
application.worksheetfunction. <function (syntax) | Excel Programming | |||
Application.WorksheetFunction.Index syntax | Excel Programming | |||
Application.wait & Blinking Connector | Excel Programming |