ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unload multiple forms (https://www.excelbanter.com/excel-programming/350496-unload-multiple-forms.html)

Runner77

Unload multiple forms
 

Hi,

I would like to kown how to unload muliple forms. I have 4 forms whic
open, and when I am in the fouth form and click exit I would like it t
close all the 4 forms.

Regards
Mar

--
Runner7
-----------------------------------------------------------------------
Runner77's Profile: http://www.excelforum.com/member.php...fo&userid=3038
View this thread: http://www.excelforum.com/showthread.php?threadid=50154


Norman Jones

Unload multiple forms
 
Hi Mark,

Try:

In Userform4 module:
'=============
Private Sub CommandButton1_Click()
Call UnloadThem
End Sub
'<<=============

In a standard module:
'=============
Sub UnloadThem()
Dim i As Long

For i = UserForms.Count - 1 To 0 Step -1
Unload UserForms(i)
Next i

End Sub
'<<=============


---
Regards,
Norman


"Runner77" wrote in
message ...

Hi,

I would like to kown how to unload muliple forms. I have 4 forms which
open, and when I am in the fouth form and click exit I would like it to
close all the 4 forms.

Regards
Mark


--
Runner77
------------------------------------------------------------------------
Runner77's Profile:
http://www.excelforum.com/member.php...o&userid=30388
View this thread: http://www.excelforum.com/showthread...hreadid=501545





All times are GMT +1. The time now is 11:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com