code to have subroutine wait doesn't work

B

B. Meincke

Hi all,
I have the following code to allow a zip operation to finish before moving
on in an Access 2000 form command button on_click event:

On Error Resume Next
Do Until oApp.Namespace(sZipFile).Items.Count = 1
Application.Wait (Now + TimeValue("0:00:01"))
Loop

This fails, flagging the word 'wait' with the following error reported:

Compile error:
Method or data member not found

Is this because there is an object library missing? If so, which? If not,
what else am I missing?

Thanks in advance for any advice or suggestions.
 
B

B. Meincke

Thank you, Bill, for your response. Actually, I have seen the application you
recommended. I understand how to create the new module, of course, but I am
not sure how to call it in the form's command button code --- ("...and use
the Shell sub.") What does Terry mean by, 'Shell sub'? My inexperience
showing again, I guess.

I would, however, for the sake of my own learning process, still like to
know why my original code fails.

Again, thanks.
--
BJM
ACE Assistant
Gary Allan High School


Bill said:
If you don't find a satisfactory answer or otherwise solve
your problem, Terry Kreft wrote an application entitled
ShellWait that I've used for several years to do what
you're wanting to accomplish.

See: http://www.mvps.org/access/api/api0004.htm

Bill
 
B

B. Meincke

Bill,
That's awesome. It may be stripped but so much easier for this novice VBAer
to understand!

Thank you so much. However, if I might indulge one more question...

Not all workstations in our domain have WinZip but all are XP so have the
built-in compression utility. Can you help me revise your code to utilize it
instead of WinZip?

Again, thank you.
 
B

B. Meincke

I'm afraid I don't understand why application.wait works in Excel and not in
Access. Can anyone clear this up for me?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top