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

Call shell stops working in 2003

Status
Not open for further replies.

XB9R

Programmer
Dec 4, 2006
20
BE
Hi all,

I have some simple code in an Access97 that just opens an Excel file on the server. This stops working on XP2 with office2003 (and an extra install of access97). It works fine on Windows2000 + office97 and on XP2 + office97.
Please do not suggest to upgrade/convert to access2003 : the application is written in access97 and just has to stay there.

I'm using some code like this :
Code:
taskID = "excel.exe ""\\server\destination path\myfile.xls""
call shell (taskID,1)

Error on XP2+office2003+access97 = file not found

Tried this already on different PC's with the same error
Someone any idea's why this code won't open with excel2003 ?

Dave
 
I think the problem is in your taskID.

try this?

Code:
taskID = "excel.exe ""\\server\destination path\myfile.xls""[b]"[/b]

If all you need to do is open the file, couldn't this be done without using shell at all?

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Thanks for the reply. You're right: I made an typing-error -> It is like you said.
Nevertheless the code works whenever there is excel97 installed on the PC. It just won't work with excel2003 and I can't figure out why. I even tried to convert the accessDB from 97 to 2003 : the code itself was NOT changed by the conversion and worked on a XP+office2003+acces97 combination. So my guess is I'm just missing the proper DLL or something.

By the way : the code is only part of a routine of several daily updates that has to be done. I just put the path + filename + application in a table & the code loops through it opening them one by one.

Dave
 
Have you tried typing out the path to excel?

Because you are in access 97, you might need to add the Microsoft Office 11.0 and Microsoft Excel 11.0 object libraries under references? I doubt that this would mess with your shell command, but you never know...

Good Luck,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Don't wanna use the path to excel, because it is not always the same on different PC's.
I've started excel succesfully from the "START - RUN" command, so the path to excel.exe is known. Also office 11.0 library is on the PC.

Dave
 
Anyone ?

Or just another way to accomplish this ?
Basically I just want to open some files (like excel, access, word, any other application)

Dave
 
And what about this ?
CreateObject("WScript.Shell").Run ""\\server\destination path\myfile.xls""

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thank you all for replying.
I 'accidently' found the solution: Since there raised a problem with Excel2003 not recognizing a rather basic function as WEEKNUM(), I installed all of the possible addins (goto tools->addins). Solved the problem of the unknown function and also solved this problem.

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top