Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locked cell without alert
Hi all!
I have locked a range of cells by vba and I'd like that when the user tries to edit them, the alert messagebox with the edit-password textbox DOESN't appear... Is it possible? thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locked cell without alert
I use a workaround where I dont allow the users to select the locked
cells. This can be enabled while protecting the worksheet using the menu. or programtically sheet1.EnableSelection = xlUnlockedCells sheet1.Protect Hope it helps. Regards, Jayant |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locked cell without alert
thanks but I have some cells not a sheet to lock...so...when the user want to
edit, I want that NO message appears... "jjk" wrote: I use a workaround where I dont allow the users to select the locked cells. This can be enabled while protecting the worksheet using the menu. or programtically sheet1.EnableSelection = xlUnlockedCells sheet1.Protect Hope it helps. Regards, Jayant |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locked cell without alert
locking the cells without protecting the worksheet does no good anyway. The
solution he suggested means users can not even actually select locked cells, so they will never recieve a message. Ben -- When you lose your mind, you free your life. "milly" wrote: thanks but I have some cells not a sheet to lock...so...when the user want to edit, I want that NO message appears... "jjk" wrote: I use a workaround where I dont allow the users to select the locked cells. This can be enabled while protecting the worksheet using the menu. or programtically sheet1.EnableSelection = xlUnlockedCells sheet1.Protect Hope it helps. Regards, Jayant |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locked cell without alert
Below is code that I found in this ng.
It does even more that protect the sheets, it also prevents the user from selecting protected cells. Select UnProtected Cells ONLY This will prevent users from clicking on protected cells on all worksheets. Therefore, the warning message will not appear. The code must be enterred in the ThisWorkbook module. Note that the EnableSelection property must be reset each time the workbook is opened as it defaults to xlNoRestrictions. The worksheet(s) must first be unprotected to set the EnableSelection property and then must be protected for it to take effect. Private Sub Workbook_Open() Dim WS As Worksheet For Each WS In ThisWorkbook.Worksheets WS.Unprotect 'Password:="wxyz" WS.EnableSelection = xlUnlockedCells WS.Protect 'Password:="wxyz", UserInterfaceOnly:=True Next End Sub Regards, Greg Wilson 5/3/03 -- steveB Remove "AYN" from email to respond "milly" wrote in message ... Hi all! I have locked a range of cells by vba and I'd like that when the user tries to edit them, the alert messagebox with the edit-password textbox DOESN't appear... Is it possible? thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Activating a sound alert on cell value | Excel Discussion (Misc queries) | |||
locked cell not locked | Excel Discussion (Misc queries) | |||
alert before deleting contents of a cell | Excel Discussion (Misc queries) | |||
can I set-up an alert in a cell? | Excel Discussion (Misc queries) | |||
Alert If Cell Value Is a Certain Value | Excel Discussion (Misc queries) |