Attn. Richie Turner - Re:Workbook_Open Active Sheet Unprotect not working.


Posted by Michele on October 18, 2001 12:04 AM

Hello Richie,
Many thanks for your help.
You are correct that the ofending sheet is not active during the WorkBook_Open operation. So I tried to make it active by doing 'Worksheets("Sheet1").Activate' but that didn't work either.
Can you give me details on how to do the Activate Method you mentioned so I can try it or I welcome any further ideas. I've tried putting my code in the Sheet1 module in Private Sub Worksheet_Activate but that doesn't work unless I have another sheet and switch from this other sheet to sheet1.
Thanks again.
Michele



Posted by Richie Turner on October 18, 2001 1:10 AM

Hi again

I think that you will need to activate the workbook using Workbooks("bookname.xls").Activate method before you can activate the sheet. This will actually activate the first sheet on that workbook, if you need a different sheet you will need to activate that one seperately using Worksheets("sheetname").Activate Finally then you can do the unprotect

Try something like this

Workbooks("bookname.xls").Activate
Worksheets("sheetname").Activate
ActiveSheet.Unprotect

Let me know how you get on.

Richie