Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
setting default filter setting | Charts and Charting in Excel | |||
Userform button setting variable from formula | Excel Discussion (Misc queries) | |||
Userform button setting variable from formula | Excel Discussion (Misc queries) | |||
Filter column using criteria from a userform | Excel Programming |