Solved

specifically open Excel 2003 or Excel 2007 if i have both

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

911 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

22 Experts available now in Live!

Get 1:1 Help Now