We help IT Professionals succeed at work.

excel selectionchange clashing with data update

PeterBaileyUk
on
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?
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2011
Commented:
Add:
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

Commented:
so simple but effective thank you

Explore More ContentExplore courses, solutions, and other research materials related to this topic.