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!

Shell in Access 2007 Vs 2003

Status
Not open for further replies.

DwayneS

Instructor
Mar 29, 2002
70
0
0
I just got a new computer. It has Access 2007. I had 2003 and a lot of apps developed in that version.
I use lot of Excel spreadsheets to calculate schedules from my Access tables and queries. Below is a line of code I use to open a typical Excel SS:

Call Shell("excel.exe V:\Finance\Material\shared\VarianceAnal\VarianceAnalActActMo.xls", vbNormalFocus)

Here's the problem -- When I run this on my new computer in Access 2007, I have to alter that code to point to the Excel.exe file, otherwise it will not work. For example ---

Call Shell("C:\Program Files\Microsoft Office\OFFICE11\excel.exe V:\Finance\Material\shared\VarianceAnal\VarianceAnalActActMo.xls", vbNormalFocus)

I'm trying to find the detail that requires that change. I'm guessing the Office installation re: Path or something like that.

Anyone know?

Dwayne Streeter, CPA, CITP
 
Not sure I completely understand what the problem is.
I'm trying to find the detail that requires that change.
The full path to the .exe file you describe for A2007 is consistent with Access 2003 as well. It should work with that full path in both versions.

Paul
 
That's true. My question is this:

Why do I need to change all my 2003 vb code in order for it to work in 2007. In the 2003 version I did not use the full path and it worked. I have examined the environmental path and Office is not included, yet the first version of the code worked just fine in 2003. Why won't it work in 2007?

Dwayne Streeter, CPA, CITP
 
Sorry Dwayne I don't have an answer for you. I did google the problem and didn't see anything that would help.

Paul
 
I might have figured this out. The computer came from my IT dept. They installed Office 2003 without Access, then installed Access 2007. Funny configuration, and I'll be a dollar it has to do with the resulting path. When I got them to install Access 2003 along with 2007 (Yes, they will coexist), both versions of Access work.

Go figure.

Dwayne Streeter, CPA, CITP
 
When things go wrong here, I ALWAYS blame the IT dept [wink]. Glad you worked it out.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top