I think you cannot do that conversion at runtime in vb6, but you can create new controls and delete controls, so you could remove the textbox and create a combo at the same position.
You can create a new control this way (a TextBox called 'Text2' in this case):
<pre>Dim ctlName As Control
Set ctlName = Form1.Controls.Add("VB.TextBox", "Text2", Form1)
ctlName.Visible = True
ctlName.Top = Text1.Top
</pre>
and you can remove it like this:
<pre>Form1.Controls.Remove ("Text2")</pre>
Hope this helps.
Last Wiki Answer Submitted: November 19, 2008 2:25 pm by carlosdl63,535 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.