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

Running an app from a form

Status
Not open for further replies.

judyscofield

Programmer
Sep 24, 2001
56
US
I have a compiled c++ program that I would like to run from a form. When I run the exe, it asks for four inputs and produces a file. When I try to run it from Access, the program starts, asks for the for inputs and closes, but the file doesn't get produced. In the event code of the button on the form I have
Dim stAppName As String

stAppName = "c:\afcars\chkdat3.exe"
Call Shell(stAppName, 1)

What am I doing wrong?

Judy Scofield
 
Judy,

Try this....

dim objWord as Object
dim strFilename as String

strFilename = "c:\afcars\chkdat3.exe"
Set objWord = GetObject(strFileName)
objWord.Application.Visible = True

Hope it helps....
 
Thanks, I tried this and got
Filename or class name not found furing Automation operation

on the Set objWord statement

??

Judy
 
Why not save headeach and do it in one line,
ver = Shell("Your Application Location")
That's it

Good Luck
 
Sorry,

var = Shell("Your Application Location")

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top