| | |
Wait/Pause Application before next process.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
The application I am writing involves creating a dos batch file and executing it using the 'Shell' command.
The batch file is used to zip up multiple files.
The zip file that is created is them emailed.
My problem is - creating a pause within the application so the zip file can be created. I have tried a simple pause (for t=1 to 100000: next t). I know this isnt the best way to do it.
:!: The zip file could take between 0.5 to 30 seconds to create.
Any help would be great.
Cheers
PG
The batch file is used to zip up multiple files.
The zip file that is created is them emailed.
My problem is - creating a pause within the application so the zip file can be created. I have tried a simple pause (for t=1 to 100000: next t). I know this isnt the best way to do it.:!: The zip file could take between 0.5 to 30 seconds to create.
Any help would be great.
Cheers
PG
Are You trying to make the batch file pause, or the VB Program wait until the batch file is done? If you are trying to wait until the batch file is done, don't use shell. (you can use shell, but it's a lot more code than this here). Use WSH within VB, as such:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
dim wsh set wsh = createobject("WScript.Shell") wsh.Run "c:\somebatchfile.bat", 0, 1
![]() |
Similar Threads
- ambiguous part 3 (C)
- Pause after startup (Windows NT / 2000 / XP)
- Need help with CPU scheduling algorithms (C++)
- Major IE Problem (Web Browsers)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Basic Question
- Next Thread: Adding media and videos using VBScript
Views: 11044 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






Good Stuff. 