PC Review


Reply
Thread Tools Rate Thread

Class module and a lot of records

 
 
--== Alain ==--
Guest
Posts: n/a
 
      17th Dec 2006
Hi,

I try to improve my VBA macros in the following fields :
- execution speed
- reduce the CPU usage
- reduce the memory usage

i have several sheets including around 21.000 records per sheet.
My first idea was to implement a simple cells comparison among sheets
but even if application.screenupdate is set to false, it tooks around 3
hours to perform all needed tasks.

Therefore, i worked around a collection solution, but it took let time
to perform the same tasks (around 1 hour) but it takes still a lot of
CPU and memory resources.

I tried to improve code by creating a Class module in couple with
collection, but it really increased memory usage by 200 % :-( now i need
around 350 Mb of RAM to execute it.

So i would like to know what is the best method to :
- compare very large "tables" (sheets) e.g : around 21.000 records each
the main tasks are :
- comparison between 3 sheets data
- scanning 1 sheet based on criteria from another sheet
- to limit CPU and Memory usage
- to increase execution code.

thanks a lot,

Al.
 
Reply With Quote
 
 
 
 
RB Smissaert
Guest
Posts: n/a
 
      17th Dec 2006
Maybe doing all in SQL might be your answer.
You can do that either in Excel sheets or maybe it is better to move the
data to a database.
If you opt for the last then have a look at SQLite.

RBS


"--== Alain ==--" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I try to improve my VBA macros in the following fields :
> - execution speed
> - reduce the CPU usage
> - reduce the memory usage
>
> i have several sheets including around 21.000 records per sheet.
> My first idea was to implement a simple cells comparison among sheets but
> even if application.screenupdate is set to false, it tooks around 3 hours
> to perform all needed tasks.
>
> Therefore, i worked around a collection solution, but it took let time to
> perform the same tasks (around 1 hour) but it takes still a lot of CPU and
> memory resources.
>
> I tried to improve code by creating a Class module in couple with
> collection, but it really increased memory usage by 200 % :-( now i need
> around 350 Mb of RAM to execute it.
>
> So i would like to know what is the best method to :
> - compare very large "tables" (sheets) e.g : around 21.000 records each
> the main tasks are :
> - comparison between 3 sheets data
> - scanning 1 sheet based on criteria from another sheet
> - to limit CPU and Memory usage
> - to increase execution code.
>
> thanks a lot,
>
> Al.


 
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
running a Sub in a class module from a functionin a general module Paul Microsoft Access Form Coding 2 9th Feb 2010 02:25 AM
fiter records in class module =?Utf-8?B?ag==?= Microsoft Access VBA Modules 1 15th Jun 2006 09:17 PM
Difference between Form's Class Module and Class Module tobesurveyor via AccessMonster.com Microsoft Access VBA Modules 4 14th Apr 2006 01:08 PM
Convert Class Module to Standard Module =?Utf-8?B?TXVycA==?= Microsoft Access VBA Modules 2 26th Apr 2005 06:33 AM
VB hang when opening a class module (or form module) Antoine Microsoft Access 1 7th Mar 2004 12:20 AM


Features
 

Advertising
 

Newsgroups
 


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