Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error '57121', application-defined or object-defined error

Status
Not open for further replies.

samicbc

IS-IT--Management
Oct 2, 2007
3
US
I have taken over a project for an employee who left, and I'm having some trouble with one of his excel workbooks. The file opens fine on my co-workers' computers but it fails when I try to open it on mine.

I get a pop up that says "File error: data may have been lost" when I open the workbook. I click 'ok'.

Then I get another popup that says "Run-time error '57121', application-defined or object-defined error". I click 'debug'.

It takes me into the VB editor, and this code line is highlighted:

Code:
Public Sub Workbook_Open()

Sheets("Search").ScrollArea = "$A$1:$Z$55" <--**highlighted line**

End Sub


Has anyone run into this problem before? Thanks for your help!!
 




Check in the Project Explorer to see if Sheet "Search" exists, or if it was LOST.

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
A big part of work could be lost after such message (code, formatting, hyperlinks, objects). I would try to save as much of the project as possible:
1. On your co-worker's computer:
check references, export vbcomponents, remove code, move sheets to other workbook and save it under new name.
2. On your computer:
check if all references (and maybe extra components) are available, try to open original workbook with disabled macros, try to open a copy of workbook without macros and succesively import code and vbcomponents.

combo
 
OK, so I've done some more research... this file will open on everyone else's PC except mine without error. I have gone into Add/Remove programs and chosen to reinstall Office 2000. I've restarted, and I'm still getting the same error.

What else could be different with my PC specifically? Do I need to completely remove Office and reinstall?
 



Try Help > Detect & Repair.

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
Password-protect vba project on the machine you can open the file. Can you open it now on your computer?
Check references and components used. If they are different from standard excel (excel, office, ole, msforms), can you yse them in brand new file on your machine?

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top