ting2000
Nov 22nd, 1999, 11:34 AM
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.
Aaron Young
Nov 22nd, 1999, 11:39 AM
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.
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
aarony@redwingsoftware.com
adyoung@win.bright.net