Error to close form

Asked

Viewed 35 times

0

What could be happening, because when I order to close a form with Unload me, is giving the following error :

Unable to Unload Within this context

  • It is possible that the form is not loaded yet, you are running the "Unload" inside the "Load" event of the form?

  • Davidterra - In this part it is sure the form is loaded and for what I’ve been checking I ended up finding the link below but in my case I have nothing also related to resize, continue in the search. As below : Private Sub cmdExit_Click() On Error Goto Trycatherror Unload Me Exit Sub Trycatherror: Dim s_dsMsg As String ... End Sub link ===> msdn.microsoft.com/en-us/library/aa243662(v=vs.60). aspx There is an Unload statement in the Resize Event of a Data, Form, Mdiform, or Picturebox control. Remove the Unload statement from the Event.

  • Please edit your question and put in it the code snippet with the form opening and also the point where the error is occurring.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.