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: 553
Default 1 Dynamic Userform vs Multiple Userforms

I need some advice on this task.

I have a listbox with 21 items. When I click onto an item, I want a unique
userform to display - for that item - with additional parameters for the user
to click. So each item brings up its own additional userform. Now I am
assuming I can approach this two ways:

1) Build 21 additional userforms programmatically
2) Build one very large form with all the controls that is called each time
an item is clicked and will hide unwanted controls.

Assuming option 2 is the way to go, do I have to create 21 click events for
each item in the listbox? Or can this be accomplished using a class module?
Each listbox item will have a unique number an type of controls. So I am not
sure if a class module works. So assuming I create 21 click events, I am
assuming that I will have to build a function which makes the appropriate
changes to the userform before it is loaded. However I will need the option
to pass the unique number of controls to this function.

Function Design_Userform(Optional A as Contorl, Optional B as Control,
Optional C As Control, Optional D as Control, Optional E as Control)
For each cntrl in Controls
'Code to hide the controls that are not needed based on
'IF stmt which hides all controls unless they are the ones passed
'to this function
Next
'Code to place controls where needed. Assume they will simply
'run vertically down form

'Code to size form to accomodate contrls placed
End

And then lastly I am assuming that I have to pass all control box data to
public variables as I need to retain the values while the user finishings
calling up the userform for the remaining listbox items. So there will be an
"OK" button on the additonal userform to pass this data to the public
variables.

Any ideas on how to get this going?

Thanks

EM

 
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
Can a Combobox in a Userform access multiple dynamic tables JackyJ Excel Discussion (Misc queries) 0 August 15th 10 01:19 AM
Multiple Userforms Upon Click Freddy Excel Programming 0 December 29th 06 01:09 PM
Multiple Controls in a Dynamic UserForm Rawce Excel Programming 1 December 6th 06 07:29 AM
Multiple Userforms at once dok112[_32_] Excel Programming 0 October 7th 04 08:15 AM
dynamic userforms bforster1[_5_] Excel Programming 2 July 21st 04 04:06 PM


All times are GMT +1. The time now is 05:27 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"