- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
My program will output to a new Excel file. I have Microsoft 2013 and 2010 installed on my computer. There are people in my company that only have 2010, so I need to be able to output to 2010.
In the references, I have added:
Microsoft Excel 14.0 Object Library
Microsoft Office 14.0 Object Library
(14.0 = version 2010)
In my code I have used "Object" instead of Excel.Workbook as I read in another forum I have to do that for this to work in older versions of Excel.
Dim xlApp As Object
Dim xlWkBook As Object
Dim xlWkSheet As Object
'Dim colorRange As Range - can't use it currently
'Open Excel application
xlApp = CreateObject("Excel.Application")
'Make sure excel is visible and add a new workbook
xlApp.Visible = True
xlWkBook = xlApp.Workbooks.Add
xlWkSheet = xlApp.ActiveSheet
The problem happens when the file is saved and I double pick the file to open it, it tells me that the file format and the extension don't match. I pick "Yes" to open it anyway and it opens just fine. Is there any way to get around this warning message?
Thanks,
Mark
Solved! Go to Solution.