Believe this will cause an error:
Set isect = Application.Intersect(MyRange,(Target.Address))
you can't intersect a range and a string.
--
Regards,
Tom Ogilvy
"chris" wrote in message
...
Use the Worksheet 's SelectionChange Event In your Project window
And do something like this
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set MyRange = Range("A1:D20")
Set isect = Application.Intersect(MyRange,(Target.Address))
If isect Is Nothing Then Exit Sub
' Put what your code is here
End Sub
anytime a cell is selected this code will fire but fill only Run your code
if its within your range.
----- Simon Lloyd wrote: -----
I want too start a macro when a cell in a certain range is left
clicked
or selected by navigating to it using the arrow keys.....i.e if cell
is
selected in range xx:yy then run macro or when cell in range is
highlighted by arrow keys.im new to VBA so an idiots guide on how to
do
this would be very well apreciated!
Thanks in advance!
Simon
---
Message posted from http://www.ExcelForum.com/