?
Solved

specifically open Excel 2003 or Excel 2007 if i have both

Posted on 2014-02-02
5
Medium Priority
?
634 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 668 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 1332 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 1332 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

762 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