LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Strange looping behaviour and Error 400

All,

I have written a piece of code (can be included if needed, but don't have it
here at present) that is used to compare to extracts from an SQL database
(since my SQL is not good enough to know if it would be possible without
Excel!).

I paste one extract to a sheet, the second to another and the macro puts
them together on the third for comparison by copying the earlier extract at
the top and the later extract at the bottom. The macro then runs through all
the lines from the earliest extract (starting at the bottom and working up,
deleting as it goes) and looks through the later extract to find a similar
line, using the match functionality on a unique identifier. It then takes
appropriate action, either removing a line, or changing it. What I am left
with, is the third sheet, with all of the lines from the earliest extract
removed, and only the pertinent lines from the later extract, and any newly
created lines remaining.....in theory. The macro also uses a modal form to
update the user about progress as the process is slow due to the deletions
(another thing I have to work on)

I tested this with a small number of lines in each extract (100 in each)
having tested all permutations I could think of with a small number (25 in
each) and the macro ran fine.

However, when I size this up, to having approx of 5000 lines in total, the
macro runs perfectly for three hours, and then crashes three lines from the
end. If I run this with approx 3000 lines of different data, it runs fine
however. I also notice that when it errors, it seems to throw Excel into a
loop, where I cannot visibly select any cells in any worksheets/books with
the mouse, although the values of the cells I try to select shows in the
value bar at the top of the screen. The VBA editing window also flickers and
is non-responsive.

Occaisionally also the macro falls over during the process with error 400.

So, having described the behaviour, please, please, please does anyone out
there in Knows-More-Than-Me--About-Excel Land have any suggestions/answers?
Happy to post the macro if needed to make sense of the above.

Many thanks in advance

Ross



 
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
Shortcut key strange behaviour BB programmer Excel Worksheet Functions 2 October 11th 06 04:58 AM
Strange if(***) behaviour? Excel 2003 - SPB Excel Discussion (Misc queries) 6 August 6th 06 05:34 PM
Strange behaviour Edgar Thoemmes Excel Worksheet Functions 1 February 8th 05 03:20 PM
Strange behaviour in VBA Help Michael Singmin Excel Programming 4 June 4th 04 07:06 PM
strange behaviour Patrick Molloy Excel Programming 0 September 4th 03 07:51 AM


All times are GMT +1. The time now is 12:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"