<p>Il n’y a pas d’instruction <code>Exit While</code> en VBA. Solutions :</p>
<ol>
<li><strong>Utilisez une variable booléenne :</strong></li>
</ol>
<pre data-code-wrap="vba"><code class="lang-vba">Dim sortir As Boolean
While condition And Not sortir
If autreCond Then sortir = True
Wend
</code></pre>
<ol start="2">
<li><strong>Convertissez en Do While (recommandé) :</strong></li>
</ol>
<pre data-code-wrap="vba"><code class="lang-vba">Do While condition
If autreCond Then Exit Do
Loop
</code></pre>
<p>La boucle <code>Do While...Loop</code> est préférable car elle supporte <code>Exit Do</code>.</p>