Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Navin Gada   on Sep 05 In MS Office Category.

  
Question Answered By: Cadencia Bernard   on Sep 05

I'm surprised that the Intersect(ActiveCell,Range("B14:B33")) works.
Because the default Property for ActiveCell is ActiveCell.Value, not
ActiveCell.Address... But evidently, Excel does some funny things..

Anyway, you don't have to use ActiveCell because the whole purpose
of the macro is to pass the Selected Cell as the "Target" range variable.
To use it, use:
If (not intersect(Target.Address,Range("B14:B33"))) then
and
If (not intersect(Target.Address,Range("M4"))) then
I tested this, and it seems to work  as *I* intended it to work.
What I don't know is if it is how YOU want it to work.
(meaning: if you select a range of cells that INCLUDES M4, it will
not indicate a "match", but if M4 is selected by itself, it works).

I guess to be more helpful, we'd have to know how you want this to operate.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Coding Problems Or get search suggestion and latest updates.


Tagged: