Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you test if a form is loaded 1

Status
Not open for further replies.
Oct 5, 1999
105
0
0
GB
Hi
I have a common subroutine which can be called from various points that I want to optionally update a status Label in a form only if it is loaded

ie I want to write code like

If Form2.Loaded Then
Form2.Label1 = "recalculating"
Else
' do nothing
End If

but of course .Loaded is not a property!
If I just refer to Form2.Label1 then Form2 will start loading - which I don't want.

I'm sure it must be simple, but can't figure it out except by setting a global variable when I load Form2
 
Great - thanks.
I hadn't taken in the fact the Forms collection only has open forms in it.
 
Maybe you don't even need to check if the Form is loaded?
Where do you have this 'common subroutine'? How do you call it? And what do you pass to it?


---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top