Giordano Bruno
Well-known Member
- Joined
- Jan 7, 2007
- Messages
- 1,341
I have this code in the ThisWorkbook section.
Private Sub Workbook_Open()
ThisWorkbook.Sheets("Futures1").Protect UserInterfaceOnly:=vbTrue
I close the workbook and open it again.
When I try to run a macro which moves some lines in the Futures1 worksheet, I get the following message:
"You cannot use this command on a protected sheet.To unprotect the sheet, use the unprotect sheet command(Tools menu, protection sub menu).You may be prompted for a password".
Can anyone see what I am doing wrong?
PPS I am not using any passwords.
PS I'm using Excel2000
Private Sub Workbook_Open()
ThisWorkbook.Sheets("Futures1").Protect UserInterfaceOnly:=vbTrue
I close the workbook and open it again.
When I try to run a macro which moves some lines in the Futures1 worksheet, I get the following message:
"You cannot use this command on a protected sheet.To unprotect the sheet, use the unprotect sheet command(Tools menu, protection sub menu).You may be prompted for a password".
Can anyone see what I am doing wrong?
PPS I am not using any passwords.
PS I'm using Excel2000