Excel/Access 2007/2010 vba chart error "specified dimension is not valid"

I have a procedure in Access 2010 that creates a spreadsheet and adds some data and charts. This works correctly in Access 2010, but when I run it in Access 2007 with Excel 2007, upon saving I get the error "the specified dimension is not valid for the current chart type." I have tried saving in different Excel formats, but all return the same error.

Does anybody have any idea why a procedure that works as intended with Access 2010 would be returning this error when run in Access 2007?
dgmoore1Asked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
it could be a compatibility issue...
upload a copy of the A2007 version.
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPConnect With a Mentor Commented:
It is probably a backward compatibility issue.

You really should develop and test in the lowest version of Office you want to support. You will need to make sure that your code will run with 2007. I find that id I write code that will work in  2007 that is will also work fine in  2010. But not the other way around.

NOTE: Excel 2010 has new features exposed in he object model (available in VBA)  that are not available in 2007.

also see:

http://www.rondebruin.nl/win/s5/win002.htm

Working with the Compatibility Checker in Excel 2007 and Excel 2010
http://msdn.microsoft.com/en-us/library/office/gg132972%28v=office.14%29.aspx
http://office.microsoft.com/en-us/excel-help/worksheet-compatibility-issues-HA010343040.aspx
0
 
dgmoore1Author Commented:
I agree that I should be developing in the version my users have, but our CIO insists that developers lead the way (as guinea pigs) with upgraded applications, so we have to use versions that are ahead of our users, unfortunately.
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPConnect With a Mentor Commented:
WOW. Unfortunately the makes it very difficult to support Office/VBA applications in prior versions.

Sounds like you will have to do a lot of testing to see what features are backwardly compatible.

Hope you are paid by the hour.
0
 
dgmoore1Author Commented:
The company is rolling out Office 2010 as assets are replaced. When a box goes back on lease return its replacement has Win 7 and Office 2010 installed. We're talking thousands of workstations at numerous locations, so it's going to take a while to get everybody on the same page. The vast majority of users only need a browser, Word and maybe Excel to do their jobs, but there are scattered requirements for other tools and custom applications.

Fortunately, if there is an ad hoc requirement for Office 2010 we can get it installed, which is what I did this week to solve my current problem. I seem to be the lucky guy who runs into obscure issues because I'm usually building stuff that nobody else does, so we don't have much of a knowledge base.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.