Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Second Fractions
Hello!
I have a procedure that includes a 1 second wait period. I've been doing: application.wait vba.now + vba.timeserial(0,0,1) and its been working fine. I want the wait period to last HALF a second (or some other fraction). Is it posible? If so, how? Best regards and thanks in advance, Albert C |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Second Fractions
Add this API function declaration to General/Declarations section of your
code window... Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) and then execute this statement to delay 1/2 second.... Sleep 500 For an example.... Sub test() Debug.Print Timer Sleep 500 Debug.Print Timer End Sub The two printed values should differ by 1/2 second. Rick "Albert" wrote in message ... Hello! I have a procedure that includes a 1 second wait period. I've been doing: application.wait vba.now + vba.timeserial(0,0,1) and its been working fine. I want the wait period to last HALF a second (or some other fraction). Is it posible? If so, how? Best regards and thanks in advance, Albert C |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Second Fractions
EXCELENT!!!!!
Thank you Sir!!!!! "Rick Rothstein (MVP - VB)" wrote: Add this API function declaration to General/Declarations section of your code window... Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) and then execute this statement to delay 1/2 second.... Sleep 500 For an example.... Sub test() Debug.Print Timer Sleep 500 Debug.Print Timer End Sub The two printed values should differ by 1/2 second. Rick "Albert" wrote in message ... Hello! I have a procedure that includes a 1 second wait period. I've been doing: application.wait vba.now + vba.timeserial(0,0,1) and its been working fine. I want the wait period to last HALF a second (or some other fraction). Is it posible? If so, how? Best regards and thanks in advance, Albert C |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fractions | Excel Discussion (Misc queries) | |||
fractions | Excel Worksheet Functions | |||
looking for fractions | Excel Discussion (Misc queries) | |||
about fractions | Excel Discussion (Misc queries) | |||
fractions help | Excel Discussion (Misc queries) |