Locking up worksheets

KentKHI

Active Member
Joined
Oct 1, 2004
Messages
492
Hi folks!

I have been building an estimating workbook with everyones help, and it has been working great. I now have a new challange though.

I have my workbook setup to connect to a seperate database workbook that opens up each time I open my estimate workbook. What I want to do is protect certain sheets in my estimate from changing after I present the estimate.

Here is what I see as the problems:

1. I want to be able to have the database open while the estimate is open.

2. I have formulas in my estimate that equal amounts calculated from the database.

3. I want to still be able to use some of the worksheets in my workbook that are not tied to the database.

Here is my first idea:

First I would save the workbook as a copy (as to keep the original to alter it if need be)

Then, I would like to take the estimate sheets that tie to the
database and set every cell equal to its current value (I mean what it is currently displaying??)

This will get rid of any formulas and allow me to use the worksheet as a non-changing read-only.

Is this possible, will it work, and any ideas on the code to perform this would be great.

I appreciate any input!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
After you gave the estimate could you run a macro to copy and paste the values into a new sheet?
 
Upvote 0
KentKHI said:
Then, I would like to take the estimate sheets that tie to the
database and set every cell equal to its current value (I mean what it is currently displaying??)

This will get rid of any formulas and allow me to use the worksheet as a non-changing read-only.

Something like this:
Code:
    With ActiveSheet.UsedRange
        .Copy
        .PasteSpecial xlValues
    End With
    Application.CutCopyMode = False
Shoudl do that part of it. If you need to make a new sheet in there someplace, so that's where the values go, post back and we can take care of that. HTH
 
Upvote 0

Forum statistics

Threads
1,224,270
Messages
6,177,574
Members
452,784
Latest member
talippo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top