kidgenius2002
asked on
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
Commandbutton_click
form2.show
'stuff that needs to be exectued after form2 is done running
end sub
'form2 stuff
commandbutton_click
form3.show
'stuff that needs to be executed after form3 is done running
close
end sub
'form3 stuff
commandbutton_click
'stuff that form3 runs
close
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
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
Commandbutton_click
form2.show
'stuff that needs to be exectued after form2 is done running
end sub
'form2 stuff
commandbutton_click
form3.show
'stuff that needs to be executed after form3 is done running
close
end sub
'form3 stuff
commandbutton_click
'stuff that form3 runs
close
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<g>... (microsoft is the one laughing I guess)
glad to help
glad to help
ASKER
unload <form>
unload userform
etc
some sick programmer is laughing now b/c u have to type "Unload Me"
argh
thanks man