vijayendra.shukla
New Member
- Joined
- Jan 29, 2010
- Messages
- 34
Hi all,
I am using a code available on one of the sites for creating a dynamic user form. but i am not able to proceed at all because of Runtime Error 1004 "Application Defined or Object Defined error".
here is the part where i am getting it:
FYI - I have included the necessary libraries eg. MS Form,Object lib, VBA.
Thanks in advance for your time and help.
I am using a code available on one of the sites for creating a dynamic user form. but i am not able to proceed at all because of Runtime Error 1004 "Application Defined or Object Defined error".
here is the part where i am getting it:
Code:
Sub MakeUserForm()
Dim TempForm As Object
Dim NewLabel As MSForms.Label
Dim NewComboBox As MSForms.ComboBox
Dim NewButton As MSForms.commandbutton
Dim NewCheckBox As MSForms.CheckBox
Dim X As Integer
Dim iNoOfSheets As Integer
Dim iTotalRows As Integer
'This is to stop screen flashing while creating form
Application.VBE.MainWindow.Visible = False
Set TempForm = ThisWorkbook.VBProject.VBComponents.Add(3)
FYI - I have included the necessary libraries eg. MS Form,Object lib, VBA.
Thanks in advance for your time and help.