Computing.Net > Forums > Programming > shell function

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

shell function

Reply to Message Icon

Name: rohrer
Date: March 19, 2007 at 14:29:10 Pacific
OS: Windows XP
CPU/Ram: ?
Product: ?
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



Sponsored Link
Ads by Google

Response Number 1
Name: Shr0Om
Date: March 20, 2007 at 05:47:55 Pacific
Reply:

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)


0
Reply to Message Icon

Related Posts

See More


JAVA problem php mail function



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: shell function

VBA Shell Function www.computing.net/answers/programming/vba-shell-function/2677.html

could I pass awk variable to shell? www.computing.net/answers/programming/could-i-pass-awk-variable-to-shell/14499.html

shell function www.computing.net/answers/programming/shell-function/1898.html