Thread
:
only select one cell
View Single Post
#
8
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
only select one cell
Right click sheet tabview codeinsert this
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
MsgBox "hi"
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Vijay Chary" wrote in message
...
Hi Kiba ! :)
You need to write an event procedure as follows.
Private Sub Selection change()
If Instr(1,selection.address,":") 0 then
Msgbox "Selection not valid !!
Endif
End sub
This procedure displays an error message if a range larger than 1
cell is selected.
I hope you are able to adapt it ( use the idea ) for your
specific
need.
Good luck !
"Kiba" wrote:
I need a macro that will prevent users from selecting more than one cell
at a
time.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett