LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Dynamic Userforms,

Is it possibly to create dynamic user forms(UF) that still have the ability
to have event driven logic?

Here is a simple example.
Non dynamic uf structure.
You have a UF (Non_Dynamic_UF) that you create with two combo boxes, CBX1
and CBX2. The contents of CBX2 are dependent on CBX1, such that.
CBX1 = Fruit, CBX2 has list Apple, Bannana, Orange
CBX1 = Vegitable, CBX2 has Corn, Potato, Broccoli

In the Non_Dynamic_UF section, I would create a function so that whenever
CBX1 changes value, CBX2 has its list re-defined.

Private Sub CBX1_Change()
'Code to manipulate CBX2 item list implemented here.
End Sub

NOW I want to re-create this same functionality in a dynamic UF where i add
these two combo boxes with code. Using the (UserForm).controls
collection/object, I know how to add both of the combo box controls.

THE QUESTION IS, can I also dynamically add in the EVENT DRIVEN logic that
updates CBX2's list items whenever CBX1 changes that is demonstrated in the
non dynamic uf example above?

IF IT CAN BE DONE,.... how does one go about doing it?

If it can't be done,....dang it!

Thanks everyone.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
1 Dynamic Userform vs Multiple Userforms ExcelMonkey Excel Programming 2 April 20th 07 08:56 PM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Excel Programming 0 March 1st 06 01:05 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
dynamic userforms bforster1[_5_] Excel Programming 2 July 21st 04 04:06 PM


All times are GMT +1. The time now is 12:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"