Answers for "vba check if userform object exists"

0

vba check if userform object exists

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
Posted by: Guest on July-08-2020

Code answers related to "vba check if userform object exists"

Browse Popular Code Answers by Language