S
Stan Brown
I have a workbook developed in Excel 2003. Now in Excel 2010 my
Workbook_Open macro is getting error 1004, Application-defined or
object-defined error. The line that the debugger points to is
Worksheets("Attendance").Protect Contents:=True
Was there some change in Excel 2007 or 2010 that invalidated the
above? From reading Excel 2010 help it sure looks like the above is
still valid.
Yes, I really do have a worksheet called "Attendance". (In the
immediate window I typed ?worksheets("attendance").name and it
responded Attendance.) Macros are enabled for the location where
this workbook lives. The workbook isn't read-only.
What's especially weird is that I have this line in a macro that is
tied to Ctrl-Shift-R:
ActiveSheet.Protect Contents:=True
and it works just fine.
I'll be very grateful if someone can tell me what's wrong and how to
fix it.
Workbook_Open macro is getting error 1004, Application-defined or
object-defined error. The line that the debugger points to is
Worksheets("Attendance").Protect Contents:=True
Was there some change in Excel 2007 or 2010 that invalidated the
above? From reading Excel 2010 help it sure looks like the above is
still valid.
Yes, I really do have a worksheet called "Attendance". (In the
immediate window I typed ?worksheets("attendance").name and it
responded Attendance.) Macros are enabled for the location where
this workbook lives. The workbook isn't read-only.
What's especially weird is that I have this line in a macro that is
tied to Ctrl-Shift-R:
ActiveSheet.Protect Contents:=True
and it works just fine.
I'll be very grateful if someone can tell me what's wrong and how to
fix it.