Home |
Search |
Today's Posts |
#1
|
|||
|
|||
locking tabs w/macros
i have a workbook that employees use to track project progress. they enter
project data into sheet 1 and vbscript macros manipulate this data and output it in various ways on worksheets 2-15. i want to lock sheets 2-15 so employees cannot enter data, but when i protect those sheets the macros are no longer permitted to work. is there a way i can prevent cell editing by USERS but permit editing by MACROS? this seems like it should be fairly obvious, but i cant figure it out. thanks in advance! |
#2
|
|||
|
|||
Hi eric,
1) you might want to use the following instruction when protecting the sheets: ActiveSheet.Protect Password:="Password", UserInterfaceOnly:=True this line has to be executed every time you open the file as the UserInterfaceOnly parameter is not saved, so you may want to build it into the Workbook_Open event. 2) another option is to include into your code instructions that would unprotect and then protect your sheets, e.g: ActiveSheet.Unprotect "Password" '.....your code ActiveSheet.Protect "Password" Regards, KL "erik" wrote in message ... i have a workbook that employees use to track project progress. they enter project data into sheet 1 and vbscript macros manipulate this data and output it in various ways on worksheets 2-15. i want to lock sheets 2-15 so employees cannot enter data, but when i protect those sheets the macros are no longer permitted to work. is there a way i can prevent cell editing by USERS but permit editing by MACROS? this seems like it should be fairly obvious, but i cant figure it out. thanks in advance! |
#3
|
|||
|
|||
KL, thanks so much - your option #2 worked perfectly! "KL" wrote: Hi eric, 1) you might want to use the following instruction when protecting the sheets: ActiveSheet.Protect Password:="Password", UserInterfaceOnly:=True this line has to be executed every time you open the file as the UserInterfaceOnly parameter is not saved, so you may want to build it into the Workbook_Open event. 2) another option is to include into your code instructions that would unprotect and then protect your sheets, e.g: ActiveSheet.Unprotect "Password" '.....your code ActiveSheet.Protect "Password" Regards, KL "erik" wrote in message ... i have a workbook that employees use to track project progress. they enter project data into sheet 1 and vbscript macros manipulate this data and output it in various ways on worksheets 2-15. i want to lock sheets 2-15 so employees cannot enter data, but when i protect those sheets the macros are no longer permitted to work. is there a way i can prevent cell editing by USERS but permit editing by MACROS? this seems like it should be fairly obvious, but i cant figure it out. thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
A "Document Map" of worksheet tabs for Excel | Setting up and Configuration of Excel | |||
3 format cell tabs hidden in excel dialog box | Excel Discussion (Misc queries) | |||
Tabs accross of bottom of sheet are not showing | Excel Discussion (Misc queries) | |||
Hidding Tabs | Excel Discussion (Misc queries) | |||
Sheet tabs disappear sometimes in Internet Explorer | Excel Discussion (Misc queries) |