Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,346
Default Run-time error 57121 "Application-defined or object-defined error"

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Run-time error 57121 "Application-defined or object-defined error"

Shane, I am unable to recreate the issue using a new workbook.

--Is the user getting the same error while trying out with a new workbook?

--May be workbook the user has written the code is a bulky one and wouldn't
have completely loaded before a reference could be made. Placing a App wait
before making reference to the sheet could help

If this post helps click Yes
---------------
Jacob Skaria


"Shane Devenshire" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,346
Default Run-time error 57121 "Application-defined or object-defined er

Thanks Jacob,

I've sent a list of questions to the user, of course it's the weekend and I
don't expect to hear back until Monday at the earliest. I'm having them
check to see what References are attached on their machines, and what SP of
2007 they are running and a few other things. Of course I check the KB but
that was unproductive.

I will have them test your idea. I'm not aware of any errors related to
2007 in this area, but I'm hoping that someone has come across a similar
problem.

I will give you credit for this question later, I don't want other
responders to skip it because its maked as answered.

Cheers,
Shane Devenshire


"Jacob Skaria" wrote:

Shane, I am unable to recreate the issue using a new workbook.

--Is the user getting the same error while trying out with a new workbook?

--May be workbook the user has written the code is a bulky one and wouldn't
have completely loaded before a reference could be made. Placing a App wait
before making reference to the sheet could help

If this post helps click Yes
---------------
Jacob Skaria


"Shane Devenshire" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Run-time error 57121 "Application-defined or object-defined error"

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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,346
Default Run-time error 57121 "Application-defined or object-defined er

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add-in Error "Application-defined or Object-Defined Error" [email protected] Excel Programming 1 April 28th 07 05:58 PM
1004 "Application-defined or object-defined error" guiu Excel Programming 6 January 12th 06 02:43 PM
What does "Application-defined or object-defined error" mean? Shatin Excel Programming 4 February 3rd 04 10:15 AM
"Application-defined or object-defined error" while printing excel report chemburkar Excel Programming 0 February 2nd 04 08:33 PM
"Run Time Error 1004 Application Defined or Object Defined Error." BJC Excel Programming 4 October 26th 03 03:09 AM


All times are GMT +1. The time now is 10:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"