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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Knowing which Forms are LOADED

Status
Not open for further replies.

bnath001

Programmer
Aug 18, 2000
100
US
HI,

I have a VB project and it has an MDI form. How do I know what are the forms that are loaded currently.

could some one give me some suggestions please.

thanks
nath
 
Use the Forms collection.

Loop through the Forms collection with either a For..Each or For...Next loop.

For I = 0 To Forms.Count - 1
do something with Forms(I).<property>
Next I

Or

Dim frmForm as Form
For Each frmForm in Forms
do something with frmForm
 
I tried using your code
For i = 0 To Forms.Count - 1
'do something with Forms(I).<property>
MsgBox &quot;hello this is &quot; & Forms(i)
Next i

I would like to know the name of the form which is opened.
when the control reaches the Msgbox statement, there is no property.

any help please.

thanks
nath
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top