Solved

specifically open Excel 2003 or Excel 2007 if i have both

Posted on 2014-02-02
5
615 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
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

828 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