|
-
Aug 18th, 2008, 03:43 PM
#1
Thread Starter
New Member
[RESOLVED] Opening Specific Version of Excel
I'm opening an instance of Excel to import data from a workbook using the following approach in VBA:
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlWSheet As Excel.Worksheet
Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Open(FileName, False)
Set xlWSheet = xlBook.Worksheets(1)
The problem is that the workbook is an Excel 2003 document, but the machine running the code has both 2003 and 2007 versions of Excel. The Excel instance opens the document in 2007 causing errors, which crash the code.
Is there a simple way of specifying in code which version of Excel to create an instance of?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|