
Help: adding a maskedbox control to a form in an addin program
I am trying to add a maskedbox control to a form in an addin program
using the follwoing code
Sub BuildForm()
Dim frmNewForm As VBComponent
Dim ctlNewControl As VBControl
Dim vbf As VBForm
'create the new form
' Add maskedbox
Set vbf = frmNewForm.Designer
** Set ctlNewControl = vbf.VBControls.Add("MaskEdBox")
End Sub
I get an error saying type mismatch when the program gets to the line **
I appreciate any comments or solutions that can help me solve this problem.
Thank you in advance
Jos Gon?alves