cyberbiker
Programmer
I need to add a control array at run time.
I will need to add an array of text boxes, an array of labels, an array of combo boxes and an array of Check boxes.
It would be nice if I could add an array of frames but I can work around that.
What I am actually doing is using a tab strip control and adding a various number of tabs depending on the text file I read, There may be as few as 2 tabs and as many as someone can dream up (although at this point it lookss as if 10 or so will be the max).
I wish to use an array so I can use the click events easily .
I do know how to do this at design time and hope that it is possible to be done at run time
I need to create these controls on various tabs in various combinations and various numbers of controls.
I have been trying to do this by defining a variable as an array and using the Add Method(Controls Collections) that I found in HELP.
It seems no matter how I do it though I receive an error message of "Not a legal Object Name"
I need to use the tab strip or the SSTab Strip (Boss wants that style so that is firm) but am open to any and all suggestions.
The offending code follows. The last 2 lines are where the compiler becomes uncooperative![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Terry
intGroupCount = intGroupCount + 1
Set tabX = frmUpdate.tabParam.Tabs.Add(intGroupCount)
tabX.Caption = strGroup
frmUpdate.Controls.Add "vbCombo", "cboValue(intGroupCount - 1)"
With frmUpdate.Controls("cboValue(intGroupCount - 1)"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I will need to add an array of text boxes, an array of labels, an array of combo boxes and an array of Check boxes.
It would be nice if I could add an array of frames but I can work around that.
What I am actually doing is using a tab strip control and adding a various number of tabs depending on the text file I read, There may be as few as 2 tabs and as many as someone can dream up (although at this point it lookss as if 10 or so will be the max).
I wish to use an array so I can use the click events easily .
I do know how to do this at design time and hope that it is possible to be done at run time
I need to create these controls on various tabs in various combinations and various numbers of controls.
I have been trying to do this by defining a variable as an array and using the Add Method(Controls Collections) that I found in HELP.
It seems no matter how I do it though I receive an error message of "Not a legal Object Name"
I need to use the tab strip or the SSTab Strip (Boss wants that style so that is firm) but am open to any and all suggestions.
The offending code follows. The last 2 lines are where the compiler becomes uncooperative
Terry
intGroupCount = intGroupCount + 1
Set tabX = frmUpdate.tabParam.Tabs.Add(intGroupCount)
tabX.Caption = strGroup
frmUpdate.Controls.Add "vbCombo", "cboValue(intGroupCount - 1)"
With frmUpdate.Controls("cboValue(intGroupCount - 1)"