ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using solver function in a locked (protected) worksheet (https://www.excelbanter.com/excel-worksheet-functions/248277-using-solver-function-locked-protected-worksheet.html)

Niels

Using solver function in a locked (protected) worksheet
 
I have made a worksheet where I am using the solver function to optimize a
blend of products. This works perfect. Now I want to lock (protect) some
areas of the worksheet, but when doing so the solver function will not work.

Following translated message arrives:
The active document is not a worksheet, is protected or shared.

Hope someone can help me.

Best ragards,

Niels


Squeaky

Using solver function in a locked (protected) worksheet
 
Hi Niels,

I have never used solver before but I have some sugestions you may try.
First, try and unlock the cells that solver references by right clicking the
cell, selecting Format Cells, then the Protection tab. Uncheck "Locked".
Protect the sheet and see if the error comes up.

If it does, you can write a macro that will unprotect your worksheet, run
the solver, then reprotect the worksheet. Use the Macro recorder to do this,
then make an icon for your toolbar and assign the macro to it for easy
access. Another way is to have a macro that simply protects and unprotects,
and you can run the solver when you need to.

Let me know if any of this helps or if you need macro help.

Squeaky


"Niels" wrote:

I have made a worksheet where I am using the solver function to optimize a
blend of products. This works perfect. Now I want to lock (protect) some
areas of the worksheet, but when doing so the solver function will not work.

Following translated message arrives:
The active document is not a worksheet, is protected or shared.

Hope someone can help me.

Best ragards,

Niels


Dana DeLouis[_3_]

Using solver function in a locked (protected) worksheet
 
Hi. Solver needs to adjust cells on the worksheet.
I believe that when Solver runs, one of the first things it does is
check to make sure the worksheet in not protected. It does not have
enough logic to check if only the changing cells are unlocked.
I would suggest to unprotected the worksheet.
Or perhaps make an unprotected copy of the worksheet via vba, and run
solver on that.
= = = = =
Dana DeLouis


On 11/12/09 10:35 AM, Niels wrote:
I have made a worksheet where I am using the solver function to optimize a
blend of products. This works perfect. Now I want to lock (protect) some
areas of the worksheet, but when doing so the solver function will not work.

Following translated message arrives:
The active document is not a worksheet, is protected or shared.

Hope someone can help me.

Best ragards,

Niels



All times are GMT +1. The time now is 07:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com