+ Reply to Thread
Results 1 to 3 of 3

identifying range

Hybrid View

  1. #1
    Yossi
    Guest

    identifying range

    Hi,
    I want to check whether the ActiveCell is within a specific range. so when
    using the Change function I would know whether to handle it or not.
    How can I check if the target cell or the ActiveCell is within a certain
    range?

  2. #2
    Steve Yandl
    Guest

    Re: identifying range

    Use the Intersect function.

    Steve



    "Yossi" <Yossi@discussions.microsoft.com> wrote in message
    news:2849894E-C01E-4E9D-AF9D-E19339FCB062@microsoft.com...
    > Hi,
    > I want to check whether the ActiveCell is within a specific range. so when
    > using the Change function I would know whether to handle it or not.
    > How can I check if the target cell or the ActiveCell is within a certain
    > range?




  3. #3
    Dave Peterson
    Guest

    Re: identifying range

    This kind of thing checks for changes to exactly one cell in A1:B99.


    If target.cells.count > 1 then exit sub
    if intersect(target,me.range("a1:B99")) is nothing then exit sub

    'your code to do the work

    Yossi wrote:
    >
    > Hi,
    > I want to check whether the ActiveCell is within a specific range. so when
    > using the Change function I would know whether to handle it or not.
    > How can I check if the target cell or the ActiveCell is within a certain
    > range?


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1