# Re: SOS~~请问有关开启Form二问题

Posted by C.T.Wang on July 31, 1999 at 00:09:19:

In Reply to: Re: SOS~~请问有关开启Form二问题 posted by wjj on July 29, 1999 at 16:53:39:

1. 提供一个"非正确解", 但在某些情形下可解决问题..

'在程式启动时将有可能要用到的form载入memory,但不显示
' (同时进入forms collection)
Load frmA
Load frmB
Load frmC
'此副程式loop检查所有已载入的form, 并show出名称合条件(字串)
' 的form
Public Sub OpenForm(ByVal sFormName As String)
Dim f As Form
For Each f In Forms
If f.Name = sFormName Then
f.Show
End If
Next
End Sub

Follow Ups: