View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Run-time error 57121 "Application-defined or object-defined er

And y ou're sure it has no trailing spaces? I think I'd just do some
checking like this (and I'm sure you know how to do this)

Dim WS as WOrksheet

for each WS in activeworkbook.worksheets
debug.print "'" & ws.name & "'" , ws.name = "DataEntryForm"
next ws


"Shane Devenshire" wrote:

Hi,

Yes, I checked that.

Cheers,
Shane Devenshire


"Jim Cone" wrote:

Is there a "DataEntryForm" sheet in the active workbook?
--
Jim Cone
Portland, Oregon USA



"Shane Devenshire"

wrote in message
Hi Folks,

The above message occurs at the point marked in the following code.

Private Sub Workbook_Open()
Dim CurrBookName As String
Dim CurrBook As Workbook
Dim TotEquipNum, CurrEquipNum As Integer

CurrBookName = ActiveWorkbook.Name
Set CurrBook = Workbooks(CurrBookName)

Set DataEntryFormSheet = CurrBook.Worksheets("DataEntryForm") <-- this
line is highlighted when the error occurs.


This application was written in Excel 2003 under XP and is being run on
Excel 2007 under Vista. The user has tested this on a number of machines
and reported the same error. I can't duplicate the problem on my home
machines.

I am not on-site with the user so any feedback you can give would be most
appreciated.

TIA,
Cheers,
Shane Devenshire