XLEnableSelection


Posted by Nigel Martin on February 08, 2002 3:19 AM

When you set a workshets properties in visual basic to xlNoSelection then protect the worksheet, it works OK but when you come back in to the spreadsheet (having svaed it ) it defaults back No Reststrictions - how can I stop this happening?

Posted by DK on February 08, 2002 3:51 AM

You can't. You must set this each time the workbook is opened. You could put some code like this in the Workbook_Open procedure:-

Private Sub Workbook_Open()
Sheet1.EnableSelection = xlNoSelection
End Sub

HTH,
D



Posted by DK on February 08, 2002 3:52 AM

Confirmation - http://www.j-walk.com/ss/excel/usertips/tip002.htm