Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've just come accross this:
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) I think this is excellent, it saves on a lot of lines of code (using Time, Ontime DoEvents etc).Not sure how it works - would like to understand it more! Does anyone have any other little gems like this that they use alot and think are useful.I'm after compact little beuties like the one above. If not, does anyone have any links to sites where more info on these mysterious little calls can be found Any help greatly appreciated J. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi J
Some useful links I hope: http://visualbasic.about.com/cs/vbandapicalls/ http://mech.math.msu.su/~vfnik/WinApi/ http://www.devhood.com/tools/tool_de...px?tool_id=563 -- HTH. Best wishes Harald Followup to newsgroup only please "jason" skrev i melding om... I've just come accross this: Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) I think this is excellent, it saves on a lot of lines of code (using Time, Ontime DoEvents etc).Not sure how it works - would like to understand it more! Does anyone have any other little gems like this that they use alot and think are useful.I'm after compact little beuties like the one above. If not, does anyone have any links to sites where more info on these mysterious little calls can be found Any help greatly appreciated J. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Harald gave you a few pointers.
Always be aware however that APicalls work directly with the operating system, so KNOWING what they're doing is essential. If you make a tiny mistake in your APicalls, you're likely to crash your application if not your system. The sleep function is quite safe however.. "The Sleep function suspends the execution of the current thread for a specified interval." For a good reference on api's there's following FREE utilities, which I always keep handy: ApiGuide (i think this is no longer updated, but VERY good as is) http://www.mentalis.org/agnet/apiguide.shtml ApiViewer 2003 http://www.activevb.de/rubriken/apiv...viewereng.html keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool (jason) wrote: I've just come accross this: Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) I think this is excellent, it saves on a lot of lines of code (using Time, Ontime DoEvents etc).Not sure how it works - would like to understand it more! Does anyone have any other little gems like this that they use alot and think are useful.I'm after compact little beuties like the one above. If not, does anyone have any links to sites where more info on these mysterious little calls can be found Any help greatly appreciated J. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You compare this to Time, Ontime, and doevents, but it doesn't work similar
to any of these - it works similar to wait. You might want to understand the distinction. -- Regards, Tom Ogilvy jason wrote in message om... I've just come accross this: Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) I think this is excellent, it saves on a lot of lines of code (using Time, Ontime DoEvents etc).Not sure how it works - would like to understand it more! Does anyone have any other little gems like this that they use alot and think are useful.I'm after compact little beuties like the one above. If not, does anyone have any links to sites where more info on these mysterious little calls can be found Any help greatly appreciated J. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yeah Tom,
I think you're right - I should learn how to do these things with vba before using this API call But I've borrowed a loop for flashing before (of the decent sort that is!) and I was really just commenting that I thought it was cool the way this call replaces quite a few lines of code J "Tom Ogilvy" wrote in message ... You compare this to Time, Ontime, and doevents, but it doesn't work similar to any of these - it works similar to wait. You might want to understand the distinction. -- Regards, Tom Ogilvy jason wrote in message om... I've just come accross this: Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) I think this is excellent, it saves on a lot of lines of code (using Time, Ontime DoEvents etc).Not sure how it works - would like to understand it more! Does anyone have any other little gems like this that they use alot and think are useful.I'm after compact little beuties like the one above. If not, does anyone have any links to sites where more info on these mysterious little calls can be found Any help greatly appreciated J. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simultaneous calls | Excel Worksheet Functions | |||
Phone calls | Excel Discussion (Misc queries) | |||
Calls per Day | Excel Discussion (Misc queries) | |||
about examples | New Users to Excel | |||
VBA Calls | Excel Programming |