R
Roy
Hi,
I posted previously in this newsgroup regarding OLEObjects. All I want to
do is to be able to create controls in a Worksheet from a UserForm. I
realised my previous post may not have been very clear, so I have a bare
bones example.
1. Create a UserForm with a button on .
2. The code for the buttons on click event handler:
Private sub btnTest_Click()
Dim oOLE as OLEObject
Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1", _
Left:=10, Top:=10, Width:=100, Height:=50)
end sub
Run the macro, click the button and voila the combobox appears, but the
UserForm disappears. I do not want this to happen as the form is an
interactive one that will need to create lots of controls. Is this a
problem with Focus, ZOrder or something like that? How do I keep the form
visible?
Any help appreciated, I am going slightly mad.
Cheers
Roy
I posted previously in this newsgroup regarding OLEObjects. All I want to
do is to be able to create controls in a Worksheet from a UserForm. I
realised my previous post may not have been very clear, so I have a bare
bones example.
1. Create a UserForm with a button on .
2. The code for the buttons on click event handler:
Private sub btnTest_Click()
Dim oOLE as OLEObject
Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1", _
Left:=10, Top:=10, Width:=100, Height:=50)
end sub
Run the macro, click the button and voila the combobox appears, but the
UserForm disappears. I do not want this to happen as the form is an
interactive one that will need to create lots of controls. Is this a
problem with Focus, ZOrder or something like that? How do I keep the form
visible?
Any help appreciated, I am going slightly mad.
Cheers
Roy