ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run-time error 57121 "Application-defined or object-defined error" (https://www.excelbanter.com/excel-programming/431904-run-time-error-57121-application-defined-object-defined-error.html)

Shane Devenshire[_2_]

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

Jacob Skaria

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


Shane Devenshire[_2_]

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


Jim Cone[_2_]

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

Shane Devenshire[_2_]

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


Barb Reinhardt

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



All times are GMT +1. The time now is 09:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com