Exit For 不在 For...Next 內Exit For not within For...Next

Exit for僅在For .。。Next迴圈。Exit For is only valid within a For...Next loop. 此錯誤的原因及解決方案如下:This error has the following cause and solution:

  • 您使用的Exit for語句位於For .。。Next語句。You used an Exit For statement outside a For...Next statement. 請確定的有效For語句位於的Exit之前。Make sure a valid For statement precedes the Exit For.

如需詳細資訊,請選取有疑問的項目並按 F1 (在 Windows 中) 或 HELP (在 Macintosh 上)。For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.