Can someone help me out - this is driving me insane.
Thanks
Function CompleteActions()
DoEvents
End Function
Then in your macro, have a line which uses the RunCode command, and in the
Function Name have CompleteActions()
How appropriate this is will depend rather on what you are trying to do.
nal
"David Harbour" <David,Har...@Compaq.com> wrote in message
news:cCkK7.1741$RL6....@news.cpqcorp.net...
Urhm. Don't macros just naturally do that anyway? Each step finishes
before the next one starts. Of course, it may be you are seeing some
funny business with screen updates being delayed. Check the thread
with subject "Order of precedence when executing code" on this very
news group.
Do you want the user to have to click something to start it going
again? Then a message box would likely do. Look up msgbox. But
keep in mind that, while the message box is open, it's not doing
anything else.
grelbr
Problem 2. I was trying to use the RunCommand Replace function in a Macro
with a Sendkeys statement to remove some info from one of my fields. - after
which I would start my queries a-querying. But Access will SendKeys to the
Replace dialog box, then thinking it is done, Access jumps to the next
action before the all important Replace has taken place. I need about a 10
second buffer (some kind of counter) that will hold off executing the next
action while the Replace is in progress. I got around this via the Excel
macro mentioned above so this is not an issue anymore but I still want
something in Access that I can use for a little breather between tasks.
If someone could create an Access funtion that would allow the lite-user
like myself to specify a wait time in the macro I would give them a big
thank you and a dollar thrity-four in change(minus postage of course).
"grelbr" <gre...@hotmail.com> wrote in message
news:1a325379.01112...@posting.google.com...
Ok, this *might* be what you want. Look up "Timer Function" then look
at the example in the Access online helps.
Though, that might not be what you want. It seems you really want
some way of sending messages between Access and Excel. There are
a bunch of ways you could do that. For example, you could arrange
a file some place. You could have your bat file create it and copy
some agreed content into it. You could have Excel do its thing
and when done, empty the file. You could have Access check that
file once per second until it's empty. Then you could go on.
grelbr
MacroStep
RunCode -- AutomationFunction()
MacroNextStep
Access retains control of the order of execution. Of course, you'll
have to also convert whatever Excel was doing to VBA.
Richard Bernstein
Function Pause5s()
For I = 1 To 35000000#
Next I
End Function
"grelbr" <gre...@hotmail.com> wrote in message
news:1a325379.01112...@posting.google.com...