ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ###Error 57121### (https://www.excelbanter.com/excel-programming/316310-error-57121-a.html)

jimmy

###Error 57121###
 
Hi folks,

I dont have much programming experience, but have cobbled together a
data collation model for several users. All have successfully used this with
the exception of one who keeps receiving the following error when attempting
to perform a number of actions : Run-time error 57121- Application-defined or
Object-defined error.

Here are a few pieces of code that are highlighted when the error occurs :

For Each Cell In Worksheets("AllTeams").Range("A2:AB2000")


Sheets("AllTeams").Select


Anybody suggest a cause for this error and any possible solutions?

Thanks

Jim.






Don Guillett[_4_]

###Error 57121###
 
Surely, there is more than this. You need not select. and do you really need
to goto 2000

For Each Cel In Worksheets("AllTeams").Range("A2:AB2000")
'what do you want to do with each cell
next cel

--
Don Guillett
SalesAid Software

"Jimmy" wrote in message
...
Hi folks,

I don't have much programming experience, but have cobbled together a
data collation model for several users. All have successfully used this

with
the exception of one who keeps receiving the following error when

attempting
to perform a number of actions : Run-time error 57121- Application-defined

or
Object-defined error.

Here are a few piece's of code that are highlighted when the error occurs

:

For Each Cell In Worksheets("AllTeams").Range("A2:AB2000")


Sheets("AllTeams").Select


Anybody suggest a cause for this error and any possible solutions?

Thanks

Jim.








keepITcool

###Error 57121###
 
Jimmy.


in your code the
Worksheets("AllTeams") is unqualified = e.g. the workbook is
unspecified, so VBA will use the Activeworkbook.

If your user has a workbook activated that doesn't have the
worksheet.. then this error will popup.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Jimmy wrote :

Hi folks,

I dont have much programming experience, but have cobbled
together a data collation model for several users. All have
successfully used this with the exception of one who keeps receiving
the following error when attempting to perform a number of actions :
Run-time error 57121- Application-defined or Object-defined error.

Here are a few pieces of code that are highlighted when the error
occurs :

For Each Cell In Worksheets("AllTeams").Range("A2:AB2000")


Sheets("AllTeams").Select


Anybody suggest a cause for this error and any possible solutions?

Thanks

Jim.



All times are GMT +1. The time now is 02:55 PM.

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