|
-
Dec 5th, 2003, 06:08 AM
#1
Thread Starter
New Member
Adding TextBox, Labels, ... during RunTime
Hi,
I have been working a while with VBa and I was wondering if it is possible to add a new TextBox or Listbox on the Form during Runtime.
Eg: you click a button 3 new textfields appear on the form.
I could already add them and make them invisible but this isn't the idea. I realy want to add a completely new fields and as many times I click on the button.
I used to know it how to do it in VB 6 but unfortunately I forgot.. I know a real shame on me...
Thx for your help.
Odec
-
Oct 22nd, 2004, 04:33 AM
#2
Member
VBA cannot do this....
In VB6 you can add a new textbox to a textbox control array at runtime, only if one already exists on the form in design time.
In VBA you cannot add controls at runtime. It is one of the real irritation I am having on my VBA projects right now.
In VB.Net, you can add controls whenever you want, and you can add event handlers to each control, and create your own control arrays or collections in whatever manner you want.
My advice, if possible move to VB.NET, if not you have to create the controls at design time.
-
Oct 25th, 2004, 10:56 AM
#3
Addicted Member
Hi Odec,
look at http://www.j-walk.com/ss/excel/tips/tip76.htm
there you find, what you want.
have a nice day
TheOnly
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|