Programatically design a form
- From: "Peter T" <peter_t@discussions>
- Date: Tue, 5 Jul 2005 10:46:04 +0100
I'm familiar with vba but fairly new to vb6
I want to replicate an Excel vba userform to a vb6 form. The form is very
complex, as I'm forever redesigning it I build a new vba userforms from an
array of control types and their properties stored in an excel work***.
Something like this
myArray = Excel-Work***-Range.Value ' control types & properties
' my array is 1 base, 2 dim's
With ThisWorkbook.VBProject.VBComponents(sFormName).Designer
For i = 1 To UBound(myArray)
s = "Forms." & myArray (i, 1) & ".1" ' control classname
..Controls.Add (s)
..Controls(i - 1).Name = myArray (i, 2)
etc
I know how to get my array into vb, I also know I will need to change some
vba classnames (eg Forms.CommandButton.1" ) and property types to their vb6
equivalents.
However, and my question, how would I use this array it to design a vb6 form
that I can save.
TIA,
Peter T
.
- Follow-Ups:
- Re: Programatically design a form
- From: Ken Halter
- Re: Programatically design a form
- From: J French
- Re: Programatically design a form
- Prev by Date: Visual Studio Installer
- Next by Date: Accessing Outlook Address Book through Javascript or vbscript
- Previous by thread: Visual Studio Installer
- Next by thread: Re: Programatically design a form
- Index(es):