' 發展單位:風禹科技驗證有限公司 ' 撰寫人:鄭子璉(Tzu-Lien, Cheng, 璉璉) ,成大水博肄,微軟最有價值專家 ' Web: http://tlcheng.twbbs.org/TLCheng/ E-Mail: qvb3377@ms5.hinet.net ' -------------------------------------------------------------------------------------- Module modWindowFormTool Public Function GetFormControlByName(ByVal srcForm As Object, ByVal strName As String) As Object Dim ibc As Integer With srcForm.Controls For ibc = 0 To .Count - 1 If .Item(ibc).Name = strName Then Return .Item(ibc) ElseIf Not IsNothing(.Item(ibc).Controls) Then Dim objReturn As Object = GetFormControlByName(.Item(ibc), strName) If Not IsNothing(objReturn) Then Return objReturn End If End If Next End With End Function End Module