PDA

View Full Version : macro to open userform and close everything else



ironj32
03-12-2007, 09:46 AM
The form opens fine. I also want everything else to close or hide.
thanks.


Sub Button5_Click()
frmCREContractForm.show
End Sub

CBrine
03-12-2007, 09:56 AM
ironj32,
I think you need to be a little more specific. Without knowing exactly what is open, we won't be able to tell you how exactly to close it.

To hide excel, just do

application.visible =false

I'm not sure if this will hide the form as well though. Also be careful, since you may end up with orphan open copies of excel sitting in memory, if you don't close it correctly.

HTH
Cal