Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

Close statement not working

If anyone has any experience with VBA you could help me out greatly.
Here's the way it goes, i have 3 forms.  in each form is an if statement that jumps up to the next form in a certain hierachry.  Form1 is the first form loaded, then Form2 and then Form3.  So, once these forms have been opened, i need to be able to close them and continue code execution on the previous form.
'form1 stuff
     'stuff that needs to be exectued after form2 is done running
end sub

'form2 stuff
     'stuff that needs to be executed after form3 is done running
end sub

'form3 stuff
     'stuff that form3 runs
end sub

the problem is that the Close statement is not closing the form like it's, seemingly, supposed to.  if i do an End statement, all of the forms close and no further code exectution takes place.  how do i get the forms to close themselves when the buttons are clicked?! i can't figure it out.  thanks

  • 2
1 Solution
close does not close forms... it closes files..

use "Unload Me" instead or "Unload <form>"
kidgenius2002Author Commented:
oik, that's pretty damn messed up b/c i had tried the whole
unload <form>
unload userform

some sick programmer is laughing now b/c u have to type "Unload Me"


thanks man
<g>... (microsoft is the one laughing I guess)

glad to help

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now