# 原来的方法不能用，另一种方法．．

Posted by 小吴 on March 16, 1998 at 17:09:21:

In Reply to: 使用 Forms 集合也不行 posted by antony on March 16, 1998 at 06:47:13:

忘了 Forms, Controls, Printers 等集合不是标准 OLE 集合。那就只能土法链钢啦！将下面这段程式码 copy 到你的程式中然后呼叫吧！

Function FindForm(ByVal FormName As String) As Form
Dim frm As Form

For Each frm In Forms
If frm.Name = FormName Then
Set FindForm = frm
Exit For
End If
Next frm
End Function

Follow Ups:

- 能不能更好? antony 19:49:02 3/16/98 (1)
  - 当然不能 小吴 22:23:20 3/16/98 (0)