How do I check if there is any active forms on the screen?
I have tried
if activeform.name = "" then
and if activeform.name = nothing
and non of them worked.
Thanks.
Printable View
How do I check if there is any active forms on the screen?
I have tried
if activeform.name = "" then
and if activeform.name = nothing
and non of them worked.
Thanks.
You can find out if any Forms are Loaded using the Forms Collection, eg.
If Forms.Count Then Msgbox "1 Or More Forms Loaded"
I you have Forms Loaded, but want to know if any are visibile, Enumerate the Forms Collection Checking the Visible Property, eg.
------------------Code:Dim bActive As Boolean
For Each Form In Forms
If Form.Visible Then bActive = True
Next
If bActive Then MsgBox "There is at least 1 Form still Visible (Active)."
Aaron Young
Analyst Programmer
[email protected]
[email protected]