Solved

specifically open Excel 2003 or Excel 2007 if i have both

Posted on 2014-02-02
5
596 Views
Last Modified: 2014-02-03
hey guys,

i have both Excel 2003 and Excel 2007 on my computer. when i do
Set xlsApp = New Excel.Application

Open in new window


even though the Excel Object Library reference in my .mdb is 11.0 (Excel 2003), it Excel 2007 is opened up instead.

Question: how do i ensure that Excel 2003 application is open if the Excel Object Library 11.0 is referred to? thanks guys!
0
Comment
Question by:developingprogrammer
  • 2
  • 2
5 Comments
 
LVL 11

Assisted Solution

by:farjadarshad
farjadarshad earned 167 total points
Comment Utility
right click on any excel file and select openwith now from here select browse into  program file ->Microsof Office->Office 11 and from here select Excel.exe now check always open files with this program.

I hope once excel files associated with the excel2003 then it will by default open excel 2003
0
 
LVL 19

Assisted Solution

by:MINDSUPERB
MINDSUPERB earned 333 total points
Comment Utility
Once you run Excel 2007, it runs a setup preparing your machine to use Excel 2007 version. And it would become a default Excel program.

If you want your code to open Excel 2003, you need to setup it as a default.

Sincerely,

Ed
0
 

Author Comment

by:developingprogrammer
Comment Utility
I see thanks guys! I guess I didn't ask me question specifically enough - how do I open the specific version of excel programmatically? Thanks!!
0
 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 333 total points
Comment Utility
Hello developingprogrammer,

Though you have 2 versions of Excel installed in your machine, it registers only on ProgID in Excel. That is the reason why every time you switch to open specific version, a setup installation occurs.

And it was the reason I suggested that if you want to open Excel 2003 in your code, make Excel 2003 as the default.

You may come across suggestion like using this code:

Set xlApp = CreateObject("Excel.Application.11")

However, if you are successful to run it, a setup installation will surely occur once you open a file in Excel 2007 version.

Sincerely,

Ed
0
 

Author Comment

by:developingprogrammer
Comment Utility
hi Ed, whao thanks for your wonderful answer! i'll use Excel 2003 as my default then!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now