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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run exe continually

Status
Not open for further replies.

sharonc

Programmer
Jan 16, 2001
189
US
I have an executable file that shows several pictures on the screen. I want to be able to click on start and have the executable run until I click on the escape key. Does any one know how I can do this?
 
Hi Sharon,
I'm sorry, but your question is really vague. Are you using MS Access in some way here? You'll need to give more information in order to get an answer. I recommend being very specific.
 
It is one form done in MS Access.

Here is my code behind the form:

Option Compare Database

Private Sub START_Click()
On Error GoTo Err_START_Click

Dim stAppName As String
Dim icnt As Long
Dim LoopCnt As Long

On Error GoTo Repeat

Repeat:
stAppName = "C:\SPIRITOFAMERIC1.EXE"
Call Shell(stAppName, 1)

LoopCnt = 2147483647
Do While icnt < LoopCnt
icnt = icnt + 1
Loop

icnt = 0
GoTo Repeat

DoCmd.Close

Exit_START_Click:
Exit Sub

Err_START_Click:
MsgBox &quot;Error Number: &quot; & Err & &quot; - &quot; & Err.Description
Resume Exit_START_Click

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top