0

I have a sheet with macros, all of them are working except one. This macro displays an error message "There isn't enough memory to complete this action. Try using less data or closing other applications. To increase memory availability, consider: - Using a 64-bit"

I am pretty much sure, that it’s not a problem with memory, might be some tweaking needed in Macro, it going into an infinity loop may be.

Problem while executing Scotland Macro in row 45. (Macros in Reports Sheet)

I am attaching Google Drive link of the Sheet

Here is the code for Scotland Macro

Community
  • 1
  • 1
max
  • 17
  • 1
  • 3
  • 1
    Please put the code in your original post. – Scott Craner Jan 21 '16 at 16:52
  • There is a google Drive link for the excel sheet in the description https://drive.google.com/file/d/0B2RjXYijzmtQeG8tblpDdFNVNXc/view?usp=sharing Sorry for lack of knowledge, do you want me post Scotland Macro code in my post? Thanks – max Jan 21 '16 at 16:57
  • 2
    Yes post the code for Scotland Macro in the original post, most people will not download a macro enabled workbook, for fear of malicious code. – Scott Craner Jan 21 '16 at 16:59
  • 1
    I would also post a link to a picture of the sheet on which the code runs. – Scott Craner Jan 21 '16 at 16:59
  • Can you able to find any mistakes in Code Scott. Sorry for bothering you – max Jan 21 '16 at 17:15
  • 2
    Apparently this is a "record macro". Now you need to go through the code and clean it up. Start by figuring out how to remove all the `.Activate` and `.Select` by referencing the object directly. [HERE](http://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba-macros) is a great tutorial on that. This will greatly speed up the code and reduce the memory overhead. – Scott Craner Jan 21 '16 at 17:15
  • Hi Scott i try to run the macro, it shows error 1004, i am attaching error in my original post. If you can sort it out will be a big help – max Jan 22 '16 at 15:13
  • @max attaching links is also not helpful when the source is removed (as is the case now, 3 years later). Please update OP. – elektrykalAJ Mar 08 '19 at 20:44

2 Answers2

0

I solved this by unhiding all columns in the worksheet.

  • If you have a new question, please ask it by clicking the [Ask Question](https://stackoverflow.com/questions/ask) button. Include a link to this question if it helps provide context. - [From Review](/review/late-answers/30536591) – Spinner Dec 10 '21 at 11:34
-1

This thing can happen when your empty cells contain some kind of ghost data also. Select all the empty rows and delete and try it. Or you can change your macros and data in to a new worksheet and try.

Manu Mohan
  • 167
  • 3
  • 17
  • It can be caused by many things. The question is years old and the OP was Last seen May 24 '16 at 15:07. – z32a7ul Jul 31 '19 at 11:32