A
AlanGriffithKapitiNZ
I would like to generate various controls on a skeleton userform (eg, the
number may vary with the occasion) and have tried
Private Sub UserForm_activate()
Stop
Dim obj As Object
Set obj = Me
Set obj = obj.Add("MSForms.CommandButton.1", "Butt1", True)
but when the form opens I receive the error message
Runtime error '-2147221005(800401f3':
Invalid class string
What am I doing wrong, please?
number may vary with the occasion) and have tried
Private Sub UserForm_activate()
Stop
Dim obj As Object
Set obj = Me
Set obj = obj.Add("MSForms.CommandButton.1", "Butt1", True)
but when the form opens I receive the error message
Runtime error '-2147221005(800401f3':
Invalid class string
What am I doing wrong, please?