Thread: Intersect
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Intersect

Instead of ActiveCell do:
Cells(ActiveCell.Row, ActiveCell.Column)

RBS

wrote in message
oups.com...
I run into a code "91" error when I perform this function


sub mymacro()

If application.intersect(Activecell, Range("A1:IV16")) then
msgbox("wrong area")
else
msgbox("better")
end if

end sub

I don't have anything declared, can anyone help?