View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_588_] Simon Lloyd[_588_] is offline
external usenet poster
 
Posts: 1
Default Cell selection in a macro


you could try:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Column = 1 And ActiveCell.Row <= 30 Then
Macro1
ElseIf ActiveCell.Column = 2 And ActiveCell.Row <= 30 Then
Macro2
ElseIf ActiveCell.Column = 3 And ActiveCell.Row <= 30 Then
Macro3

End If
End Sub

where macro1,2 or 3 is the name of the macro you call on you can chang
the Activecell.Row to be the last row in your data.

Hope this helps

Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=27096