PC Review


Reply
Thread Tools Rate Thread

Advanced Filter causes excel to crash

 
 
Ebrahim Khatami
Guest
Posts: n/a
 
      25th May 2004
I have this line of VB code within a program which causes
excel to crash. It is trying to get the unique entries
from a list. It used to work under windows NT but since
XP it became very unreliable and it works on one machine
but not in a different one. I used different variation of
the code but still it is not working. Any Idea ?
(Cells E1 and H1 contain same titles)

Range("E1:E2000").AdvancedFilter
Action:=xlFilterCopy, CopyToRange:=Range("H1"),
Unique:=True
**********************************
OR
' Columns("E:E").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range("H1"), Unique:=True
************************************
OR
Columns("E:E").Select
ActiveWorkbook.Names.Add Name:="Test",
RefersTo:=Selection
Range("Test").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range("H1"), Unique:=True
*************************************

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      25th May 2004
If you set up a test workbook with minor amounts of data, do you get the same xl
crash?

You may want to try Rob Bovey's code cleaner.
http://www.appspro.com/

It sometimes clears up the unexplainable errors.

If that doesn't help, I'd think about recreating that worksheet. Maybe it's
getting corrupted.

Ebrahim Khatami wrote:
>
> I have this line of VB code within a program which causes
> excel to crash. It is trying to get the unique entries
> from a list. It used to work under windows NT but since
> XP it became very unreliable and it works on one machine
> but not in a different one. I used different variation of
> the code but still it is not working. Any Idea ?
> (Cells E1 and H1 contain same titles)
>
> Range("E1:E2000").AdvancedFilter
> Action:=xlFilterCopy, CopyToRange:=Range("H1"),
> Unique:=True
> **********************************
> OR
> ' Columns("E:E").AdvancedFilter Action:=xlFilterCopy,
> CopyToRange:=Range("H1"), Unique:=True
> ************************************
> OR
> Columns("E:E").Select
> ActiveWorkbook.Names.Add Name:="Test",
> RefersTo:=Selection
> Range("Test").AdvancedFilter Action:=xlFilterCopy,
> CopyToRange:=Range("H1"), Unique:=True
> *************************************


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
 
Paul Robinson
Guest
Posts: n/a
 
      25th May 2004
Hi
Have you tried activating the sheet that the filter acts on? This
worked for me when I had, what sounds like, similar problems.
regards
Paul

"Ebrahim Khatami" <(E-Mail Removed)> wrote in message news:<118d001c441ea$a661da80$(E-Mail Removed)>...
> I have this line of VB code within a program which causes
> excel to crash. It is trying to get the unique entries
> from a list. It used to work under windows NT but since
> XP it became very unreliable and it works on one machine
> but not in a different one. I used different variation of
> the code but still it is not working. Any Idea ?
> (Cells E1 and H1 contain same titles)
>
> Range("E1:E2000").AdvancedFilter
> Action:=xlFilterCopy, CopyToRange:=Range("H1"),
> Unique:=True
> **********************************
> OR
> ' Columns("E:E").AdvancedFilter Action:=xlFilterCopy,
> CopyToRange:=Range("H1"), Unique:=True
> ************************************
> OR
> Columns("E:E").Select
> ActiveWorkbook.Names.Add Name:="Test",
> RefersTo:=Selection
> Range("Test").AdvancedFilter Action:=xlFilterCopy,
> CopyToRange:=Range("H1"), Unique:=True
> *************************************

 
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
Customize View Advanced Filter Causes Crash =?Utf-8?B?S2VpdGggUnVzc28=?= Microsoft Outlook Discussion 2 6th Nov 2007 09:42 PM
Advanced Filter Causes Crash flipnello Microsoft Excel Misc 1 1st Oct 2004 09:56 PM
Advanced Filter Causes Crash flipnello Microsoft Excel Misc 2 1st Oct 2004 05:19 PM
Advanced Filter Crash ExcelTrainer Microsoft Excel Crashes 0 25th May 2004 08:34 PM
A Verification Needed. Crash Excel with Advanced Filter/Cond Format LennyJo Microsoft Excel Misc 1 23rd Feb 2004 12:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:21 AM.