Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForms VBE and Class Modules...
I have a template that takes raw data (first row is header row and all
subsequent rows are data) and programatically creates a userform that the user selects certain check boxes to do certain tasks - sort by this data item, subtotal by this item, format data this way, breakout raw data into tabs by this item, save by this item, etc. - and deletes the userform. The user form has the raw data headers as rows and the check boxes as colums (raw data column headers = user form rows in the first column) . Each column of check boxes is named a certain way so they can be handled as selected; example Col1_CheckBox_1 determines what field to sort. The reason for the having the userform created this way is the raw data fields change depending on what data is retrieved. I have a class module that groups the userform check boxes and checks for changes - some columns have only 1 check allowed, others more than 1. Originally I had the user form created, used, and deleted in a single process until it was determined limits need to be placed on certain tasks that need to be performed. The class module code wasn't invoked at this time because the code was still running and couldn't break away from the VBE process to run the class module code. As it is now the user selects the raw data file and the user form is created. They then have to select another control to invoke the user form. What I'm trying to get to, if possible, is to have this take place in one step from the user's perspective. The user form is deleted on closing the file. Any ideas? -- MacGuy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForms VBE and Class Modules...
I would think yo ucould create an event in the regular module that will start
the class module. Then put in your regular module code a "DoEvents" which will wait for the class module to complete. Finally put a show.userform in your regular module to launch the userform. "MacGuy" wrote: I have a template that takes raw data (first row is header row and all subsequent rows are data) and programatically creates a userform that the user selects certain check boxes to do certain tasks - sort by this data item, subtotal by this item, format data this way, breakout raw data into tabs by this item, save by this item, etc. - and deletes the userform. The user form has the raw data headers as rows and the check boxes as colums (raw data column headers = user form rows in the first column) . Each column of check boxes is named a certain way so they can be handled as selected; example Col1_CheckBox_1 determines what field to sort. The reason for the having the userform created this way is the raw data fields change depending on what data is retrieved. I have a class module that groups the userform check boxes and checks for changes - some columns have only 1 check allowed, others more than 1. Originally I had the user form created, used, and deleted in a single process until it was determined limits need to be placed on certain tasks that need to be performed. The class module code wasn't invoked at this time because the code was still running and couldn't break away from the VBE process to run the class module code. As it is now the user selects the raw data file and the user form is created. They then have to select another control to invoke the user form. What I'm trying to get to, if possible, is to have this take place in one step from the user's perspective. The user form is deleted on closing the file. Any ideas? -- MacGuy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Class modules: parametrize class object fields | Excel Programming | |||
Copying UserForms & Modules to another workbook | Excel Programming | |||
comboboxes, userforms and class modules | Excel Programming | |||
Basic question - modules and class modules - what's the difference? | Excel Programming | |||
Delete Modules and Userforms | Excel Programming |