View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
sparks[_3_] sparks[_3_] is offline
external usenet poster
 
Posts: 12
Default hope someone can help with excel save with 2003 and 2007 installed on my computer


when I do Debug.Print oExcel.Version
I get 11.0




On Fri, 23 Sep 2011 08:08:44 -0700 (PDT), clawdogs
wrote:

On Sep 23, 10:48Â*am, sparks wrote:
my system has 2003 and 2007 installed on it.
everything I do defaults to 2003 for some reason.
I can go to the office12 directory and run 2007 fine.
even the open with wiki in xp I specify office 2007 and it will open
the file with 2003 version



On Fri, 23 Sep 2011 10:10:48 -0400, GS wrote:
sparks was thinking very hard :
it runs but like I said I only get xls type of output so I don't know
if 2003 or 2007 is running...how do I tell?


Set oExcel = CreateObject("Excel.Application")


If oExcel.Version < 12 Then '//it's 2003 or earlier
Â*'process as early
Else '//it's 2007 or later
Â*'process as latest
End If


Why do you need the path? The OS knows which Excel version to run!- Hide quoted text -


- Show quoted text -


Well then do the following to default to have an xls file default to
excel 2007. in explorer go to tools folder option file types.
find the xls extension in the file types list then click change then
browse to the excel version you need. make sure "Always use the
selected program.. is selected...