Question Locked

Problem opening Excel Sheet created from MS Access 2007 (VBA)

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
First: I am not an expert at development in VB, VBA or pretty much anything else. I am busy obtaining a Diploma in ICT - long way to go still. We are using Office XP Professional on most of our PCs at work, as it was supplied via a license agreement with Microsoft (Department of Education). I have been using MS Office 2003 (my own licensed package) for some time now, until recently when our institution (at last, on its own) upgraded some of the computers to Office 2007, of which mine was one. Okay, we went through the compatibility problems and all - at least I thought we had most bases covered... My problem is that I use Access to create a mark sheet for Educators. It is an Excel object created from within Access through VBA and now, some users (running Office XP Professional) cannot open any of their custom Excel sheets. A message appears saying that the format of the file is not correct/supported and then it just opens a load of garbage. I am able to open the spreadsheet just fine in Office 2007, but (prior to opening) it reports that the file is "in a different format than specified by the file extension" (probably an XLSX-file with the XLS extension forced onto it - I think), asks whether I want to open the file and then opens up fine. BUT not on my Office 2003 at home (same as Office XP). Has it got anything to do with COMPATIBILITY, the references in VBA, or is it something completely different? Is there a way that I can tell VBA which format/version to use when creating the Excel sheet? I am willing to post some of the (rather poor) code online, if required.

6 replies

by xastain

Hi, seanferd. Thank you very much for your reply. What I did in the meantime was to change my code to create an .XLSX file, which opens fine in Excel 2007 (without prompting). It doesn't open in Excel XP, but with the compatibility pack it does (with the .XLSX extension) - so THANKS for that, BUT I've got approximately 100 PCs to set up with the compatibility pack, which I might just do.

What would help MORE is if I could find a way to "tell" Access by means of the coding in VBA what version of Excel sheet (object) I wish to create, i.e. an Excel 97-2003 Workbook. Perhaps I'm just being stubborn, but there must be a way... there always is... well, almost always...

by thumbsup2

... setting Excel to default to saving files in 97/2003 format instead of allowing it to remain set as 2007 for default?

Perhaps that's all you need to do is set the defaults.

by patb071

In the macro, Have you changed the output format to excel 97 - 03? I would recommend installing the compatibilty pack also, before you know it you will get a lot of support calls.

by seanferd

definitely.

Create the original as the lowest common version, later versions of Office will run it.

This discussion is closed to new replies.