Selecting one cell..... automatically selects other cells... so, some kind of grouping cells, like i

P

Pierre De Cat

Hi everyone,

simple question, maybe tough answer.

Is it possible, when I selct let's say cell C4, that automatically some
other cells are selected, C5 and C6 for example?
It is for drag and drop application and the guys here keep forgetting to
selct the other cells, so th spreadsheet becomes a mess.


Thanks in advance,
Pierre
 
F

Frank Kabel

Hi Pierre
this can be done using the selection_change event of your worksheet but
I wouldn't reccomend this - better to train your users :)

But you may try the following (put this in your worksheet module):
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.count > 1 Then Exit Sub
If Intersect(Target, Me.Range("C4")) Is Nothing Then Exit Sub
Application.EnableEvents = False
On Error GoTo sub_exit
Range("C4:C6").Select
sub_exit:
Application.EnableEvents = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top