Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
jjk jjk is offline
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activating a sound alert on cell value Sebastian Flyte Excel Discussion (Misc queries) 0 December 28th 09 04:12 PM
locked cell not locked Wanna Learn Excel Discussion (Misc queries) 1 December 17th 08 06:01 PM
alert before deleting contents of a cell Mortgage Man Excel Discussion (Misc queries) 3 December 15th 06 04:30 PM
can I set-up an alert in a cell? Scott Excel Discussion (Misc queries) 4 April 13th 05 04:14 PM
Alert If Cell Value Is a Certain Value SteveLincoln Excel Discussion (Misc queries) 1 March 18th 05 11:46 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"