1
votes

I've inherited an old Excel 2003 application, and need to convert it so that it works in Excel 2007. The application makes use of a spreadsheet as a "popup" inside the application for doing volume calculations. In Excel 2003, this works as expected. In Excel 2007, VBA complains with an "Object Required" error.

Browsing through the Object Browser, Excel 2003 lists "VolSheet" as a Spreadsheet object. Excel 2007 can't find it at all. Excel 2007 does list "VolSheet" as a Shape if you loop through all shapes (ActiveSheet.Shapes), however.

My question is: Is there a way to force Excel 2007 to recognize VolSheet as a spreadsheet? Would I have to Dim it somewhere and find a way to convert the Shape reference to a spreadsheet? Can I trick Excel 2007 into recognizing that it does in fact already exist inside one of the Worksheets?

1
I'm afraid VolSheet is something specific to your solution so it's a bit hard to debug with this info. What's the specific line of code that fails, and are there any references missing (Tools..References in the VBA editor)? - Chris Rae
It is possible that VolSheet is an external file that has been added as a reference. As Chris R says, have a look at the references, or failing that, try a search for VolSheet. - Fionnuala
@ChrisR The line of code that fails is whatever first references VolSheet. There are no missing references. My first thought with all of this is that it was somehow embedded into the main worksheet as an object in Excel 2003, and Excel 2007 no longer recognizes it as an identifiable object. It's used something like the following: Sheet1.VolSheet.Top = 2.25 Sheet1.VolSheet.Activate and etc. - Kazzatso
@Remou I have searched for VolSheet within both the VBA project and within Excel's design mode. Neither has turned up any results. - Kazzatso
I guess you have stepped through the code? Can you give the line on which the error occurs and a few lines around it, or the whole procedure, if it is not too large. - Fionnuala

1 Answers

0
votes

Seems like you need to update your install of OWC on the 2007 machine

Office Web Components version 11 initially did not support Office 2007, but was updated to add it in SP1. See Link and Link for a security patch.