Unable to unload within this context (Error 365)
In some situations you are not allowed to unload a form or a control on a form. This error has the following causes and solutions:
There is an Unload statement in the Paint event for the form or for a control on the form that has the Paint event. Remove the Unload statement from the Paint event.
There is an Unload statement in the Change, Click, or DropDown events of a ComboBox. Remove the Unload statement from the event.
There is an Unload statement in the Scroll event of an HScrollBar or VScrollBar control. Remove the Unload statement from the event.
There is an Unload statement in the Resize event of a Data, Form, MDIForm, or PictureBox control. Remove the Unload statement from the event.
There is an Unload statement in the Resize event of an MDIForm that is trying to unload an MDI child form. Remove the Unload statement from the event.
There is an Unload statement in the RePosition event or Validate event of a Data control. Remove the Unload statement from the event.
There is an Unload statement in the ObjectMove event of an OLE Container control. Remove the Unload statement from the event.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기