+ Reply to Thread
Results 1 to 7 of 7

Worksheet_Change Event

  1. #1
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Worksheet_Change Event

    Hi All,
    I want the following code to activate when I change cell A3. How do I specify the code must run ONLY when cell A3 is changed?


    Please Login or Register  to view this content.
    Thank You.
    Last edited by Aland2929; 07-24-2009 at 04:46 AM.

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Worksheet_Change Event

    Try:-
    Please Login or Register  to view this content.
    Mick

  3. #3
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Worksheet_Change Event

    I want the explanation for this code.can anybody tell me this.
    THANKS
    ExcelKeechak

  4. #4
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Worksheet_Change Event

    I want the explanation for this code.can anybody tell me this.
    The worksheet change event is passed a 'Target' range, that is the cell or cells where you are at the moment.
    Mick's code is checking the address of that cell to see if it matches the one you are interested in.
    ps. manners never hurt either...
    If you find the response helpful please click the scales in the blue bar above and rate it
    If you don't like the response, don't bother with the scales, they are not for you

  5. #5
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Question Re: Worksheet_Change Event

    Thanks Mick, but I am getting a type mismatch error?

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: Worksheet_Change Event

    Is BranchCriteria a named range of cells or a single cell

    If it is a single cell then you need to add .Address to the command
    Without the address command it is testing the BranchCriteria cells value
    Please Login or Register  to view this content.

    If a range of cells then

    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  7. #7
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: Worksheet_Change Event

    Thank You. It works perfectly.

+ 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