ExcelBanter

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

Mike H.

RunTime Error 57121
 
When running a macro that is called from the workbook open area. The called
macro is in module 1, sometimes users get this error: runtime error 57121,
Application-defined or object-defined error. Any ideas why I get this. I
can't get rid of the error except to end execution. The line stuck on is:

Sheets("TransferHeader").Select

Jim Thomlinson

RunTime Error 57121
 
Is the sheet possibly hidden? You can not select a hidden sheet.
try this...

with Sheets("TransferHeader")
.Visible = xlSheetVisible
.Select
End With
--
HTH...

Jim Thomlinson


"Mike H." wrote:

When running a macro that is called from the workbook open area. The called
macro is in module 1, sometimes users get this error: runtime error 57121,
Application-defined or object-defined error. Any ideas why I get this. I
can't get rid of the error except to end execution. The line stuck on is:

Sheets("TransferHeader").Select



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

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