Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
browsing filter
I have a file that imports data from .xml's and .csv files. If button
1 is pressed, I only want to look for .csv and .xls files, if button 2 is pushed, in only want to look for .xml files. I am using the following code when 1 is pressed .Filters.Add "spreadsheet", "*.xls; *.csv", 1 When 2 is pressed I use this filter ..Filters.Add "spreadsheet", "*.xml", 1 They both run fine, until I trying running one after I just ran the other. When I try to run the other, it uses the filter criteria I used previously instead the of the criteria I want to use now. I have to exit the program to get it to work. Does anyone know why this is? Each filter is performed in separate subroutines and modules. I call which routine to run when the button is pressed. I have verified that the buttons are calling the correct functions. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
browsing filter
On Feb 13, 10:45 am, "mcolson" wrote:
I have a file that imports data from .xml's and .csv files. If button 1 is pressed, I only want to look for .csv and .xls files, if button 2 is pushed, in only want to look for .xml files. I am using the following code when 1 is pressed .Filters.Add "spreadsheet", "*.xls; *.csv", 1 When 2 is pressed I use this filter .Filters.Add "spreadsheet", "*.xml", 1 They both run fine, until I trying running one after I just ran the other. When I try to run the other, it uses the filter criteria I used previously instead the of the criteria I want to use now. I have to exit the program to get it to work. Does anyone know why this is? Each filter is performed in separate subroutines and modules. I call which routine to run when the button is pressed. I have verified that the buttons are calling the correct functions. It looks like I needed to add a .filters.clear to clear out the filters first. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
browsing filter
.Filters.Clear
.Filters.Add "spreadsheet", "*.xls; *.csv", 1 .Filters.Clear .Filters.Add "spreadsheet", "*.xml", 1 -- Regards, Tom Ogilvy "mcolson" wrote in message oups.com... I have a file that imports data from .xml's and .csv files. If button 1 is pressed, I only want to look for .csv and .xls files, if button 2 is pushed, in only want to look for .xml files. I am using the following code when 1 is pressed .Filters.Add "spreadsheet", "*.xls; *.csv", 1 When 2 is pressed I use this filter .Filters.Add "spreadsheet", "*.xml", 1 They both run fine, until I trying running one after I just ran the other. When I try to run the other, it uses the filter criteria I used previously instead the of the criteria I want to use now. I have to exit the program to get it to work. Does anyone know why this is? Each filter is performed in separate subroutines and modules. I call which routine to run when the button is pressed. I have verified that the buttons are calling the correct functions. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need a calculation for browsing centre | Excel Worksheet Functions | |||
Browsing for a folder in "Look in:" | New Users to Excel | |||
Browsing for a folder in "Look in:" | Setting up and Configuration of Excel | |||
Browsing for a folder in "Look in:" | Excel Discussion (Misc queries) | |||
Browsing for a folder name? | Excel Programming |