Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Intersect
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Intersect
Forgot to say that you also have to deal with the resulting range like this:
If Not Application.Intersect(Cells(ActiveCell.Row, _ ActiveCell.Column), Range("A1:A10")) Is Nothing Then RBS "RB Smissaert" wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Intersect Line | Charts and Charting in Excel | |||
Intersect with decimal | Excel Programming | |||
Intersect Formula??? | Excel Programming | |||
Intersect Formula VBA Help | Excel Programming | |||
Help with If Not Intersect | Excel Programming |