excel selectionchange clashing with data update

Posted on 2012-08-15
Last Modified: 2012-08-15
I have an update routine that runs a number of subs that update various cells, however, the update is triggering:
Public Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

I dont want that to run while i am updating, I only wanted to use it after the cells were populated.

how do i achieve this?
Question by:PeterBaileyUk
    LVL 85

    Accepted Solution

    application.enableevents = false

    Open in new window

    before the code that updates the cells then reset it to true afterwards. You could also simply not select any cells.

    Author Closing Comment

    so simple but effective thank you

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
    Introduction This Article is a follow-up to my Mappit! Addin Article (, it was inspired by an email posting I made to EUSPRIG (, I will briefly cover: 1) An overvie…
    The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now