ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can i protect worksheet until a value is placed in a certa (https://www.excelbanter.com/excel-discussion-misc-queries/120595-re-how-can-i-protect-worksheet-until-value-placed-certa.html)

CLR

How can i protect worksheet until a value is placed in a certa
 
These sort of things need to be tuned to your specific application, but here
is a sample to give you the idea.....it goes in the Worksheet Module

Private Sub Workbook_Open()
'Sample macro to unprotece sheet upon user entry in inputbox
'by Chuck, CABGx3
Dim strname As String
strname = Trim(InputBox( _
"Enter your assigned code", "PassCode"))
Sheets("Sheet1").Select
Sheets("Sheet1").Unprotect
Range("a1").Value = strname
End Sub

Much elaboration can be done to this also. You can have a hidden sheet that
will record each time the workbook is opened and by who, the filesize, etc
etc etc.....a complete log of file opening.

hth
Vaya con Dios,
Chuck, CABGx3



"Double A" wrote:

The workbook open macro sounds like an option, how do i go about creating one?

"CLR" wrote:

First off, you cannot really "force" anything in EXCEL. All those sorts of
things are usuaally controlled by Macros, and simply starting the file with
macros disabled defuzes that system........and any GURU can break into just
about any Excel "security" system. That said, what you want to "encourage"
can be done using a Workbook-Open macro. It could pop up a box for the user
to fill in a value and then store that value in a desired place, etc
etc...........another solution "might" be to condition each formula on a
given value being in a specific cell, like
=IF(X1="flabbergast",A1+B1,""), instead of just =A1+B1.....
If you want code, post back with a few more details and someone will help.

Vaya con Dios,
Chuck, CABGx3




"Double A" wrote:

I am trying to force people to enter a value in a single cell before they are
then able to edit any other part of the worksheet is this possible?



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

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