Chewyhairball
Active Member
- Joined
- Nov 30, 2017
- Messages
- 312
- Office Version
- 365
- Platform
- Windows
Hi Guys
I have this bit of code that doesn't allow you to select anymore than 1 cell at a time.
I am trying to adapt it so it only works in the range C13:T13 and doesn't allow more than 3 cells selected within this range.
any help is appreciated.
thanks
Rory
I have this bit of code that doesn't allow you to select anymore than 1 cell at a time.
I am trying to adapt it so it only works in the range C13:T13 and doesn't allow more than 3 cells selected within this range.
any help is appreciated.
thanks
Rory
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'>> Prevent user from multiple selection before any changes:
If Selection.Cells.Count > 1 Then
MsgBox "Sorry, multiple selections are not allowed.", vbCritical
ActiveCell.Select
Exit Sub
End If
End Sub