Question about : For Each XXX In XXXX
Posted on 1999-01-07
I have a form containing two command buttons :
Private Sub Command1_Click()
Dim mynew As Form1
Set mynew = New Form1
Private Sub Command2_Click()
Dim myform As Form
For Each myform In Forms
What surprises me is the line above. There is no error if
I use "Dim myform As Form" or "Dim myform As Form1".
But typename(myform) shows 'form1'.
I want to know if :
Dim myvar As X
For Each myvar In Y
the, should the class of X = class of element in Y ?