Computing.Net > Forums > Programming > shell function

shell function

Reply to Message Icon

Original Message
Name: rohrer
Date: March 19, 2007 at 14:29:10 Pacific
Subject: shell function
OS: Windows XP
CPU/Ram: ?
Model/Manufacturer: ?
Comment:

Does anyone know how to close a file if it was opened using the shell function? Below is the code I currently have.

'opens file
temp = Shell("C:\MSOFFICE\OFFICE11\msaccess.exe C:\Data\Encrypted\TA.mdb")
'initiates DDE channel to MS Access
chan = DDEInitiate("MSACCESS.EXE", "C:\Data\Encrypted\TA.mdb")
'runs macro1
Application.DDEExecute dbs1, "Macro1"
'terminates DDE channel
Application.DDETerminate chan

All I need to do now is close the file TA. temp.Close does not work. I've tried some various other possibilities, but can't seem to figure it out. Any ideas?

Thanks,
Phil


Report Offensive Message For Removal

Response Number 1
Name: Shr0Om
Date: March 20, 2007 at 05:47:55 Pacific
Subject: shell function
Reply: (edit)

I dont think you can specify to close a spesific DB with access command line. All you can do is to close access itself (taskkill)


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: shell function

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software