WorkSheet_Change BUG

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

GuillaumA

XLDnaute Occasionnel
Bonjour,
Après utilisation d'un Worksheet_Change sur liste déroulante, ce dernier à buggé a tel point que plus aucun de mes WorkSheet_Change du classeur ne marche.

Ce bug a déjà été découvert mais je n'ai pas trouvé de personne a qui cela avait fait bug tous les WorkSheet_Change sans exception (même si macros différentes etc...)

Quelqu'un sait-il comment faire disparaître ce bug ?

Edit: Voici une réponse de Microsoft à ce sujet.

An update on this problem for anyone who stumbles across
it in a search.

After some discussions with MS, it appears that there is a
timing problem with Excel if you use Data Validation, a VB
function and a Worksheet_Change event that modifies a
range (any range) on the worksheet. If the VB function is
called using a value from the DV dropdown list (or any
data validation that fails), the Worksheet_Change event
will produce an error when trying to modify the range.

Randy Smith from MS came up with the workaround of putting
an Application.Calculation = xlCalculationManual at the
beginning of the Worksheet_Change event and then an
Application.Calculate at the end.

Unfortunately, because you need to turn calculation to
manual, you'll have to create a WS_Change event (that just
does a Calculate) in every worksheet in your app.

I hope that helps! Thanks to Frank Kabel and Randy Smith
for their efforts.

Cordialement,
Guillaume A.
 
Dernière édition:
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

Réponses
0
Affichages
466
Retour