Question : vba check if userform object exists
Answered by : thoughtless-tapir-5iqd7uarme6m
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
Source : https://stackoverflow.com/questions/44257145/check-if-textbox-exists-vba-using-name | Last Update : Wed, 15 Jul 20