Hi,
I have two questions.
1) Is it possible to prevent the user from selecting multiple cells? I only allow the user to select 1 cell at one time.
2) I have protected some cells which I do not wish the user to edit. Is there a way that I can even prevent the user to select those particular cells?
For the protected cells when protecting you a list of options one of which is to allow users to select locked cells, so you need to make sure all other cells are unlocked (Ctrl+A then right click, format, protection, uncheck the locked box, then lock the individual cells you want to protect) as locking cells only works when a sheet is protected.
The select only one cell can be cured like this:
put this in the worksheet code module (right click worksheet tab, view code and paste in)Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Cells.Count > 1 Then MsgBox "Please select only one cell", vbOKOnly, "Multiple cell detection" Range("A1").Select End If End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks