Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Who got the answer for this question??? 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
This is the code that I'm using and my question is How can I make a "Wait" between the time the computer compress and the time that he create the EXE file?


'Copy the original database to my C drive
SourceFile = "R:\Redax PO\Redabck_be.mdb"
Destination = "C:\Temp\Redabck_be.mdb"
FileCopy SourceFile, Destination

'Launch Winzip ans zip the file
Call Shell("C:\Program Files\winzip\Winzip32 -min -a c:\temp\redabck_be.zip C:\Temp\Redabck_be.mdb")
SendKeys "{^} & A "

'Make an EXE file with the Db zip
Call Shell("C:\Pkware\Zip2exe.exe c:\temp\redabck_be.zip")
 
how long do you need to wait?

dim x as double
do while x <> 100000
x=x+1
loop

the faster you machine the larger the number

Also
you can also set a variable to True and then when a process is finished set it to false

MyVar=true
Gosub xxxx
Do while MyVar=True
Loop

finish it here

exit sub
xxxx:
do something here


MyVar = False
return

DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
The proper way to complete this task is to use something other than the shell command.
Microsoft has explained this quite well (with example code) in the following knowledge base article.


I have used this code for exactly the same thing (create a zip then convert to exe) and it works perfect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top