
Create Text Box or Label at Run Time ?
Quote:
> I am trying to build a DDE program in VB 3.0 to feed information into Excel
> 5.0. However, the items cannot be determined at design time. Is it possible
> to create a Text Box or Label at runtime such that a new DDE item can be
> created to be used by Excel.
> Regards.
> Damon Tam
----------
The best way that I know to do this is to use a control array
of text boxes or labels. Add a text box or label to your form and
set its Index property to 0.
When you need a new text box at run-time, use the following:
Load Text1(n) 'Where n is the new index value.
Text1(n).Visible = True 'Assuming you want it visible.
I've used this in several projects where I've needed to establish
DDE links with multiple applications with satisfactory results.
Cordially,
Bob
----------