Run-time error 57121

Posted on 2011-10-19
Medium Priority
Last Modified: 2012-08-13
My workbook was created in 2010 and needs to run under 2003. There are some macros in the workbook. When I open it in 2003 it goes through a conversion and then pops up:
Run-time error 57121
Application-defined or object defined error and debugs at the With state:
Sub Workbook_Open()
Dim ws As Worksheet
With Sheets("Home").OLEObjects("cboSelectSpreadsheet").Object
    For Each ws In ThisWorkbook.Worksheets
        If ws.Name <> "Home" Then .AddItem ws.Name
    Next ws
End With

End Sub

Open in new window

This workbook works fine in 2010 but the users use 2003
Question by:Frank Freese
LVL 37

Accepted Solution

TommySzalapski earned 2000 total points
ID: 36995052
What type of object is cboSelectSpreadsheet?
If that object type is new to 2007/2010, then you may need to change it.

I would recommend saving the spreadsheet (from your 2010 machine) as a 2003 version. The conversion works a lot better that way and it will warn you about things that might not convert well.
Just hit "Save as..." and find the 97/2003 .xls option.

Author Comment

by:Frank Freese
ID: 36995498
the object in question is a combo box.
when trying to save as 2003 wb I'm advised some functionaly maybe lost

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question