MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 18th, 2002, 06:48 PM   #1
Nimrod
MrExcel MVP
 
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
Default

I have an excel macro that makes new workbooks,copies sheets into them and then closes the new workbooks.
This process has a large amount of copiing and formula calculations.
MY PROBLEM: Is that eventually the program freezes due to memory problems. Does anyone know how to clear the ScratchPad memory or anything else ... programatically .. that could help with this problem

Thanks for reading ... hope to hear from someone who can help

[ This Message was edited by: Nimrod on 2002-05-19 02:11 ]
Nimrod is offline   Reply With Quote
Old May 18th, 2002, 06:59 PM   #2
elgringo56
Board Regular
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

Putting this in your macro will clear the clipboard

Application.CopyObjectsWithCells = False
Application.CutCopyMode = False
elgringo56 is offline   Reply With Quote
Old May 18th, 2002, 07:21 PM   #3
Nimrod
MrExcel MVP
 
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
Default

De agradecimiento mucho elgringo ... I will run a test right now .
Nimrod is offline   Reply With Quote
Old May 18th, 2002, 07:26 PM   #4
elgringo56
Board Regular
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

ok, but this old gringo does not speak a to much spanish, just limp along on my spanglish. Hope it helps some, it did for me.
elgringo56 is offline   Reply With Quote
Old May 18th, 2002, 08:14 PM   #5
Nimrod
MrExcel MVP
 
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
Default

Sorry I haven't gotten back to you yet but the program is still running... takes about an hour for the process to run its course. IE. There are about 100 Workbooks that get made up ... each workbook has 4 to 12 worksheets ... and each sheet has at least 1200 formulas ... with data coming from 19 different DB's....
I will let you know if your suggestion did the trick or not
Again thanks for the help

Nimrod is offline   Reply With Quote
Old May 18th, 2002, 08:58 PM   #6
Nimrod
MrExcel MVP
 
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
Default

%#^& ... No luck does anyone else have any ideas ?
Nimrod is offline   Reply With Quote
Old May 18th, 2002, 09:08 PM   #7
elgringo56
Board Regular
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

Sorry, Nimrod, that was my best thought on it. Good luck with it
elgringo56 is offline   Reply With Quote
Old May 18th, 2002, 09:33 PM   #8
Nimrod
MrExcel MVP
 
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
Default

Thanks Elgringo , I do appreciate the effort. Hopefully I can return the favour some time.
Nimrod is offline   Reply With Quote
Old May 18th, 2002, 11:25 PM   #9
Brian
Board Regular
 
Join Date: Apr 2002
Posts: 113
Default

1) If you can't find a true solution, then I sugest finding a method of accomodation by determining what size limits you need to stay below and then adjust the macro accordingly.

Therefore I suggest displaying information about the current status so that you can determine how many workbooks were open, or how many cells were just copied, or the like so that you can

To display info you can use;
Call StatusBarMsg(10, "Adding Rows to Sheet SIE.") 'Display Status in StatusBar:

(or keep updating a msgbox)

To get system info you can use the worksheet function: Info( )
"memavail" Amount of memory available, in bytes.
"memused" Amount of memory being used for data.
"numfile" Number of active worksheets.

2) To determine if memory really is the problem, try using a computer with more memory. Or decrease the memory in your compter to see if the problem happens sooner.

3) Remember to check your virtual memory and swap file sizes, and available disk space.

4) Have you tested your macro with smaller dummy files to confirm that it truely is a memory problem and not something else?

Brian is offline   Reply With Quote
Old May 18th, 2002, 11:52 PM   #10
Brian
Board Regular
 
Join Date: Apr 2002
Posts: 113
Default

Some windows programs do not release all memory whem a file closes, resulting in less available memory the longer you work.

I don't know if Excel sufferes from this, but you could try closing excel and then repoening before running the macro, or even rebooting the coumputer.

I expect that you know this, but unload all unnecessary add-ins, close other programs that are running, turn off screen updataing, place calculation in manual mode, etc.

And this ad for a memory product just poped up while I was surfing another site: http://dl.winsite.com/bin/downl?win95/excel/ASAPUtilities_setup.exe|532|4000000037293

Brian is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On

Forum Jump


All times are GMT -4. The time now is 11:37 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes