PDA

View Full Version : Solved: Excel 97 switch to 2003 - incompatibility issue



debauch
08-04-2006, 04:27 AM
Hello.
We are upgrading to Excel 2003 in our office (for a portion of us) and I was the first to test it, to make sure it would be compatible with our work files.
We have this one file, that runs all of our oracle & access queries, and plugs it directly into our daily reports. It is amazing, and we have been using it for seven years.
When in 2003, I beleive the switch from the 8.0 object library to 11.0 in the VB references is causing this error, and spent all day yesterday trying to resolve it. I made sure I had all the previous add-ins and even tried copying the old .olb (excel8) file over, and reference it, but it does not appear in the list.
Here is the error I get when trying to use our tool:

For Each ob In ThisWorkbook.Sheets("main menu").OptionButtons
If ob.Value = xlOn Then << Debug starts here
projectname = ob.Caption
Exit For
End If
Next
Now, the basis behind this code is this :
We have radio buttons to break down each section.
On the second sheet, it finds 'projectname' (the radio button's text)
and fills a listbox with the reports to run ...

Is there a way to reference the old excel 8 object library or another way around changing all the code? THe reason I ask, is we only have licences to give to 1/2 of the staff ... the other 1/2 will still need '97.

Any other details needed that I may have left out, do not hesitate to ask. Thanks.

mdmackillop
08-07-2006, 01:50 PM
Can you post a sample 97 workbook with the buttons and basic code?

Killian
08-08-2006, 05:29 AM
For Each ob In ThisWorkbook.Sheets("main menu").OptionButtonsdoes this work in 97? There's no "OptionButtons" collection in the OM...

debauch
08-09-2006, 04:54 AM
For Each ob In ThisWorkbook.Sheets("main menu").OptionButtonsdoes this work in 97? There's no "OptionButtons" collection in the OM...

Yes it does work.

I acutally figured it out this morning after much frustration.
All the option buttons were grouped in 97, and work this way. Once I ungrouped them in 2003, it worked just fine.

Embarassing how simple to fix, but releiving.