PC Review


Reply
Thread Tools Rate Thread

browsing filter

 
 
mcolson
Guest
Posts: n/a
 
      13th Feb 2007
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 With Quote
 
 
 
 
mcolson
Guest
Posts: n/a
 
      13th Feb 2007
On Feb 13, 10:45 am, "mcolson" <mcolson1...@gmail.com> 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.

 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      13th Feb 2007
.Filters.Clear
.Filters.Add "spreadsheet", "*.xls; *.csv", 1


.Filters.Clear
.Filters.Add "spreadsheet", "*.xml", 1


--
Regards,
Tom Ogilvy


"mcolson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
KB981432 Junk Email Filter update for Outlook 2003 causes filter f improved_cylinder Microsoft Outlook Discussion 1 15th Apr 2010 07:21 PM
List Box used to filter a report in print preview, when make more than one selection it does not filter the selections. Incolor Microsoft Access Forms 2 25th Apr 2006 04:20 PM
Use input box to make filter choice while providing list of possible filter choices GretOgrady Microsoft Excel Discussion 3 20th May 2005 12:20 AM
ISAPI filter and directory browsing Dmitry Duginov Microsoft ASP .NET 2 28th Feb 2005 02:34 AM
SHARED WEB BROWSING / CO-BROWSING ? Sabian Smith Windows XP General 3 16th Jan 2005 09:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:34 PM.