Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Edit Locked Cells with UserForm only
I have three cells in worksheet that I want to remain locked on the worksheet.
And I only want the userform to allow these cells to be updates. The ok button on the form updates these cells. But now it gives me this error since the workbook is now locked: Run-time error '1004' I need to unlock it and lock it again. need VBA code help here. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Edit Locked Cells with UserForm only
Hi Benjamin,
You can either specify that you want to allow programmatic changes when you open the workbook. Private Sub Workbook_Open() Sheet1.Protect userinterfaceonly:=True End Sub or you can uprotect and reprotect your worksheet when you make the change Private Sub Commandbutton1_Click() sheet1.unprotect 'make changes sheet1.protect end sub "Benjamin" wrote: I have three cells in worksheet that I want to remain locked on the worksheet. And I only want the userform to allow these cells to be updates. The ok button on the form updates these cells. But now it gives me this error since the workbook is now locked: Run-time error '1004' I need to unlock it and lock it again. need VBA code help here. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Locked worksheet & hyperlinks (w/ select locked cells unchecked) | Excel Discussion (Misc queries) | |||
Locked Cell - can still edit | Excel Worksheet Functions | |||
edit comments in locked cells | Excel Worksheet Functions | |||
Code to edit directly in cells from userform | Excel Programming | |||
Code to edit directly in cells from userform | Excel Programming |