views:

509

answers:

2

Hello,

I have an excel worksheet with 2 comboboxes, and 3 scrollbars. I want to protect all the sheet except this form objects (and one cell). When i try to protect the sheet, i can't use the scrollbars and comboboxes. How can i unlock them, keepin the protection for the rest of the sheet with vba ? I tried to unlock the cells linked to the form objects but it still doesn't work.

Thank u

AB

A: 

What about Menu option Data --> Allow Users to Edit Ranges?

Jim
don't find the menu, my excel is in french. This menu is in excel or visual basic editor ? Actually i just want they can use my scrollbars and comboboxes when i protect my sheet (the cells linked to the form objects have to be protected too)
Abspirit
Which version of Excel?
Jim
my version is Excel 2003
Abspirit
Apologies. It's the menu option next to Data in Excel.Tools --> Protection --> Allow Users to Edit RangesI'm also using 2003.
Jim
A: 

Why not put the cells that need to be modified on a very hidden worksheet.

Create a named range e.g. "InputCell" in a separate worksheet e.g. "SheetWithInputCell". Set the cell link of the combobox to the named range using =InputCell.

Then set the worksheet to VeryHidden. VeryHidden means that users can't right-click on the sheet tabs and unhide it.

To set the sheet to very hidden, go to the VBA IDE (Alt+F11) and look at the Properties window. If you can't see the Properties window, select View > Properties Window.

In the Project Explorer window (View > Project Explorer), select the worksheet to hide and set the Visible property to xlSheetVeryHidden.

Then you can leave the hidden sheet unprotected and lock the sheet with the controls.

yeah that's what i decided to do.. in fact i put the linked cells in an hidden column and unlock this cells in my code (users can't make appear the columns when the sheet is protected) and i linked this hidden cells to others in my sheet in order to show the values that the user chooses.. but this cells are protected.
Abspirit
thank u very much for u answer !
Abspirit
You're welcome :) I'm glad you got it sorted.