Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default API Calls - EXAMPLES needed

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default API Calls - EXAMPLES needed

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default API Calls - EXAMPLES needed

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default API Calls - EXAMPLES needed

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default API Calls - EXAMPLES needed

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
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
Simultaneous calls farid2001 Excel Worksheet Functions 4 March 13th 09 08:22 PM
Phone calls Paduan learner Excel Discussion (Misc queries) 1 February 12th 09 11:07 PM
Calls per Day Nate Excel Discussion (Misc queries) 1 September 17th 08 09:59 PM
about examples hassan barjini New Users to Excel 1 November 2nd 05 11:08 AM
VBA Calls Rob Bovey Excel Programming 4 August 23rd 03 05:32 AM


All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"