Solved

specifically open Excel 2003 or Excel 2007 if i have both

Posted on 2014-02-02
5
621 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 11

Assisted Solution

by:farjadarshad
farjadarshad earned 167 total points
ID: 39828777
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
ID: 39828783
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
ID: 39828793
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
ID: 39828887
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
ID: 39829797
hi Ed, whao thanks for your wonderful answer! i'll use Excel 2003 as my default then!
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
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…

688 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