📅  最后修改于: 2022-03-11 14:59:57.994000             🧑  作者: Mango
Public Function WidgetExists(ByVal Name As String) As Boolean
On Error Resume Next
WidgetExists = Not Me.Controls(Name) Is Nothing
On Error GoTo 0
End Function
Sub Test()
MsgBox WidgetExists("Textbox" & 1)
End Sub