ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to prevent "Private Sub Workbook_SheetSelectionChange" to execute when a certain sub is executed ? (https://www.excelbanter.com/excel-programming/437623-how-prevent-private-sub-workbook_sheetselectionchange-execute-when-certain-sub-executed.html)

Luc[_7_]

How to prevent "Private Sub Workbook_SheetSelectionChange" to execute when a certain sub is executed ?
 
The title says it all....

Chip Pearson

How to prevent "Private Sub Workbook_SheetSelectionChange" to execute when a certain sub is executed ?
 
You can turn off event handling with the Enable Events property:

Application.EnableEvents = False
' your code here
Application.EnableEvents = True

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Fri, 18 Dec 2009 21:55:19 +0100, "Luc" wrote:

The title says it all....


Don Guillett

How to prevent "Private Sub Workbook_SheetSelectionChange" to execute when a certain sub is executed ?
 
Not really. You should ALWAYS post your code(s) for comments and suggestions. Why select?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Luc" wrote in message ...
The title says it all....

Mike H

How to prevent "Private Sub Workbook_SheetSelectionChange" to exec
 
Hi,

I assume you have code in this event that conditionally you don't want to
execute. Tell us what this condition is.

Mike

"Luc" wrote:

The title says it all....


Luc[_7_]

How to prevent "Private Sub Workbook_SheetSelectionChange" to execute when a certain sub is executed ?
 
Thanks for your help, that did the job !!
Luc


"Chip Pearson" schreef in bericht
...
You can turn off event handling with the Enable Events property:

Application.EnableEvents = False
' your code here
Application.EnableEvents = True

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Fri, 18 Dec 2009 21:55:19 +0100, "Luc" wrote:

The title says it all....




All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com