View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy[_2_] Doug Glancy[_2_] is offline
external usenet poster
 
Posts: 11
Default Making cells so users can select them

Thanks, I knew there had to be a better way.

Doug

"steve" wrote in message
...
Doug,

Include this in your event code
ActiveSheet.EnableSelection = xlUnlockedCells
Now they can only selected unlocked cells
--
sb
"Doug Glancy" wrote in message
...
You could try the Worksheet_SelectionChange event. I imagine this will
cause other headaches, but I think it does what you want. Right-click

on
the spreadsheet tab, choose Properties and paste this code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim badrange As Range

Set badrange = Range("A1:A5") 'insert correct range here

If Not Intersect(Target, badrange) Is Nothing Then
MsgBox "You can't select cells " & badrange.Address
ActiveCell.Offset(0, 1).Select 'or select another range
End If

End Sub


Doug


"KimberlyC" wrote in message
...
Hi
I need to make a group of cells protected in such a way that the users
cannot even select them.
I tried to lock them and then protected the worksheet, but the users

can
still select the cells.
The reason I'm trying to do this is to keep users from copying the

cells
to
another location. These cells are borders and if they copy them by

mitake
it places the borders in another part of the worksheet.
Is there a way to make those cells where a user cannot even select

them?

Thanks so much!