VB6 and VBScript Dynamic Form Loading

285 views Asked by At

I have a list of strings that represent existing form names in my vb6 project. I need to iterate through each name and dynamically load each form to access its controls programmatically. So far I have tried using the ScriptHost command to execute a string generated script however, I have not been successful in loading the form.

1

There are 1 answers

0
Carlos Gomes On

Try to add forms using your names, then show.

Set frm = Forms.Add("myForm")
frm.Show()