ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Please help with Application.Wait ( ) (https://www.excelbanter.com/excel-programming/349629-please-help-application-wait.html)

Steve[_80_]

Please help with Application.Wait ( )
 
Hello,
I am trying to produce a 1 second delay function using "Wait":

Function Delay ( Input )

Application.Wait ( TimeValue "00:00:01")

Delay = Input

End Function


One, I must be doing something wrong because the delay is not produced
for any delay time specified (even 30 seconds). Please, what should I
improve?

Two, I don't want to suspend other activities in the worksheet when the
delay is executed. Will "Wait" be appropriate for that purpose? What
are the alternatives?

Thank you very much for your time.
Steve


evgny[_2_]

Please help with Application.Wait ( )
 
hi Steve
look at
http://www.cpearson.com/excel/ontime.htm

Regards
Yngve


Steve[_80_]

Please help with Application.Wait ( )
 
evgny wrote:
hi Steve


Hello Evgny,

look at
http://www.cpearson.com/excel/ontime.htm


Thank you very much. It is incredible how powerful Excel really is. I
suppose not many people can really appreciate what's _really been done
by its creators.

My trouble is I have never programmed in VBA and have no grasp of e.g.
the use of global variables. All I need is this one single function to
produce the delay (I can't really make what's got to be out of the
professional info you kindly provided).

I will be most greatful if you kindly decide to help me a little more
directly.

Would you be kind enough as to give me a specific example of a function
which
1) once its input has changed starts measuring a parameter specificied
amount of time
2) then returns the value (so the _time lapse from the change of input
to the change of output_ is parameter specified)
and 3) does not freeze other worksheet operations, in particular, the
operations of other such functions (I (vaguely) understand I am talking
about simulating parallel computations on a serial machine, but I _do_
believe time slicing is no problem for Excel).

My aim is to implement a small model of a microprocessor, for which
purpose I need a collection of NAND gates and their connections the
delay of which I will be able to control.

I understand, however, that this is a non-standard question, and that
you may have more important problems to attend to.

Thank you very much indeed for writing.
Steve



All times are GMT +1. The time now is 01:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com