Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Put Password Protection in Code
I have a workbook which will be used by several payroll clerks to enter
timesheet data for hundreds of employees. One sheet of the workbook is for data entry, and another sheet performs calculations based on the data. Among other things, the spreadsheet compiles the entry for each employee and clears the data entry form for the next employee. The compiled data is stored on a sheet titled "Compiled Totals." At the end of the day, each payroll clerk will generate a csv file based on the combined totals data. This data will be uploaded to a payroll system. This may not be the best way to do this, but what started out as a simple entry form has turned in to a mini database system. One of the requirements of my client is that the system be done in Excel so they can maintain it. My problem is that I'd like to protect the Combined Totals page so that the payroll clerks can't alter the data after they've entered it. But since I'm writing to the page, I can turn the protection on. I could programmatically protect and unprotect the page using something like the following, but is this really the best way to do this? I'm writing to the Combined Totals page after each employee is entered, so I would need to protect and protect the sheet mulitple times in the process, and I'm afraid that will be too taxing for the system. Any suggestions? ActiveWorkbook.ActiveSheet.Protect Password:=NN, DrawingObjects:=True, Contents:=True, Scenarios:=True Also, do you have to be on the active sheet to turn the protection on and off? I seem to be doing a lot of select statements in my code which is beginning to tax the system. Thanks. Connie |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA code error with Protection turned on - help please | Excel Discussion (Misc queries) | |||
Validate MsgBox Entry to Data in Cells | Excel Discussion (Misc queries) | |||
Protect Workbook vs Worksheet?? | Excel Worksheet Functions | |||
How can I remove workbook protection with no password? | Excel Discussion (Misc queries) | |||
Make Change Case in Excel a format rather than formula | Excel Worksheet Functions |