Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 194
Default Q setting up UserForm for filter criteria

I'm doing a repetitive AutoFilter. I have one macro that filters my
worksheet based on a series identifier. Then I have to filter for one or
more other criteria, and then do a text search, hiding rows that don't
match. To do another search, I have to reset the whole thing and go through
the whole filter process again.

Suddenly I think, I can streamline this if I can enter all my criteria in
one UserForm. Sounds good - but I've never done that before, and I'd like
to ask a couple of questions before I start. (I'm hoping to lessen the
number of brick walls to bang my head on!)

1. One filter criteria is a list of one or more of three items. This is
six possible combinations. Do I need six IF statements, one for each combo?
Actually seven, because none of the above is also valid; that column doesn't
get filtered.

2. Can I call a macro from an existing module? Or does all my code have to
be in the UserForm?

3. A couple of the existing macros I would call have their own
message/input boxes. Can I hide the UserForm to display these other boxes
without dumping the Form and its code out of memory?

TIA
Ed


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default setting up UserForm for filter criteria

1. One filter criteria is a list of one or more of three items. This is
six possible combinations. Do I need six IF statements, one for each combo?
Actually seven, because none of the above is also valid; that column doesn't
get filtered.

You decide - you are writing the code to set the filter - there is no
automatic link

2. Can I call a macro from an existing module? Or does all my code have to
be in the UserForm?

You can call code in general/standard modules from the event code in the
userform

3. A couple of the existing macros I would call have their own
message/input boxes. Can I hide the UserForm to display these other boxes
without dumping the Form and its code out of memory?

You can display the boxes over the userform (default behavior) or you can
hide the form, call the code, unhide the form. Hiding does not take the form
out of memory - unloading does.

--
Regards,
Tom Ogilvy



"Ed" wrote in message
...
I'm doing a repetitive AutoFilter. I have one macro that filters my
worksheet based on a series identifier. Then I have to filter for one or
more other criteria, and then do a text search, hiding rows that don't
match. To do another search, I have to reset the whole thing and go

through
the whole filter process again.

Suddenly I think, I can streamline this if I can enter all my criteria in
one UserForm. Sounds good - but I've never done that before, and I'd like
to ask a couple of questions before I start. (I'm hoping to lessen the
number of brick walls to bang my head on!)

1. One filter criteria is a list of one or more of three items. This is
six possible combinations. Do I need six IF statements, one for each

combo?
Actually seven, because none of the above is also valid; that column

doesn't
get filtered.

2. Can I call a macro from an existing module? Or does all my code have

to
be in the UserForm?

3. A couple of the existing macros I would call have their own
message/input boxes. Can I hide the UserForm to display these other boxes
without dumping the Form and its code out of memory?

TIA
Ed




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
setting default filter setting tpeter Charts and Charting in Excel 0 December 4th 09 02:50 PM
Userform button setting variable from formula teepee Excel Discussion (Misc queries) 4 January 4th 06 06:59 PM
Userform button setting variable from formula teepee Excel Discussion (Misc queries) 0 January 3rd 06 08:26 PM
Filter column using criteria from a userform Eileen[_3_] Excel Programming 1 February 26th 04 02:16 AM


All times are GMT +1. The time now is 05:35 AM.

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"