Hi
I am getting a run-time error '5' (Invalid procedure call or arguement) when trying to process the following:
ActiveWorkbook.Protect password:=[WorksheetPass]
WorkSheetPass is a named reference to a cell on sheet 2 (active is 1). It contains a value, such as "fred".
The statement it fails on is inside a subroutine.
When I use
ActiveWorkbook.Unprotect password:=[WorksheetPass]
from within the main macro it is fine.
Do I need to pass the value via teh subroutine call?
Applications Support
UK
I am getting a run-time error '5' (Invalid procedure call or arguement) when trying to process the following:
ActiveWorkbook.Protect password:=[WorksheetPass]
WorkSheetPass is a named reference to a cell on sheet 2 (active is 1). It contains a value, such as "fred".
The statement it fails on is inside a subroutine.
When I use
ActiveWorkbook.Unprotect password:=[WorksheetPass]
from within the main macro it is fine.
Do I need to pass the value via teh subroutine call?
Applications Support
UK