473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dynamically created controls

SAM
Hi everyone,

I have actually been successful in creating controls
onto forms on the fly. What I am wondering is if it
is possible to generate VBA code for a particular control
at the same time.

For example, a combobox is created with all the properties
added in code. Then, an event procedure (ie. ON CLICK) is
subsequently generated for that control via code.

I have been able to create a blank form with VBA included
for non-existent controls that can later be pointed to. But,
I'm wondering if it can be done programatically from scratch.

Thanks for any suggestions. SAM
Nov 12 '05 #1
4 2383

"SAM" <ga*********@hotmail.com> wrote in message
news:98**************************@posting.google.c om...
Hi everyone,

I have actually been successful in creating controls
onto forms on the fly. What I am wondering is if it
is possible to generate VBA code for a particular control
at the same time.

For example, a combobox is created with all the properties
added in code. Then, an event procedure (ie. ON CLICK) is
subsequently generated for that control via code.

I have been able to create a blank form with VBA included
for non-existent controls that can later be pointed to. But,
I'm wondering if it can be done programatically from scratch.


Yes, look for help on the insertlines method.

Regards,

Duncan Macarthur
Nov 12 '05 #2

"SAM" <ga*********@hotmail.com> wrote in message
news:98**************************@posting.google.c om...
Hi everyone,

I have actually been successful in creating controls
onto forms on the fly. What I am wondering is if it
is possible to generate VBA code for a particular control
at the same time.

For example, a combobox is created with all the properties
added in code. Then, an event procedure (ie. ON CLICK) is
subsequently generated for that control via code.

I have been able to create a blank form with VBA included
for non-existent controls that can later be pointed to. But,
I'm wondering if it can be done programatically from scratch.


Yes, look for help on the insertlines method.

Regards,

Duncan Macarthur
Nov 12 '05 #3
Hello,
What I do in that situation is to create the controls at
design time, complete with the VBA code to handle events, but I set
the visible property to false. Then, as I need them, I make them
visible.

Write me direct, if you need more help.
Hank Reed
Nov 12 '05 #4
Hello,
What I do in that situation is to create the controls at
design time, complete with the VBA code to handle events, but I set
the visible property to false. Then, as I need them, I make them
visible.

Write me direct, if you need more help.
Hank Reed
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kiyomi | last post by:
Hello, I create a Table1 dynamically at run time, and at the same time, I would like to create LinkButton controls, also dynamically, and insert them into each line in my Table1. I would...
0
by: John Crowley | last post by:
I'm having an odd problem with viewstate and a dynamically created control inside a repeater template. Basically, I have a repeater setup like this in the aspx:
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am have facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the web...
2
by: Chad | last post by:
I have a problem that I am desperate to understand. It involves dynamically adding controls to a Table control that is built as a result of performing a database query. I am not looking to...
1
by: Marcus | last post by:
I have a problem maybe one of you could help me with. I've created a data entry screen with lots of dynamically-created client-side controls. I create HTML texboxes client-side by assigning a...
5
by: Amoril | last post by:
I've read quite a few different message on various boards and for some reason I'm still having trouble wrapping my head around this viewstate maintenance and trying to get these dynamically created...
9
by: Chris | last post by:
I am dynamically adding a user control to each row in a gridview. The reason I am doing it dynamically is the user control is different depending on certain data in the gridview. The gridview...
4
by: mohaaron | last post by:
I can think of a lot of reasons why this might need to be done but as far as I can tell it's not possible. I've been looking for a way to add HtmlTableRows to a table using a button click for a...
1
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.