Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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
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
Class modules: parametrize class object fields Jean-Pierre Bidon Excel Programming 11 August 31st 06 02:49 PM
Copying UserForms & Modules to another workbook excelnut1954 Excel Programming 2 May 24th 06 10:19 PM
comboboxes, userforms and class modules natanz[_2_] Excel Programming 3 November 29th 05 02:59 PM
Basic question - modules and class modules - what's the difference? Mark Stephens[_3_] Excel Programming 9 May 8th 05 11:48 AM
Delete Modules and Userforms Peter Pantus Excel Programming 1 September 26th 03 08:17 PM


All times are GMT +1. The time now is 11:31 PM.

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

About Us

"It's about Microsoft Excel"