ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Not enough Memory running macro (https://www.excelbanter.com/excel-programming/277580-not-enough-memory-running-macro.html)

Rich96

Not enough Memory running macro
 
I keep getting an error when it hits the 16th library. Basically I have
one worksheet with all information. I'm running this macro to split to
seperate worksheets which are already there. I've closed every
application and even rebooted. I still get not enough memory. I've
even split the macro into smaller ones but still get the error. Any
help/suggestions??



Sub split_libs()
'
' split_libs Macro
' Macro recorded 9/19/2003 by rbateman
'CUSJHAATM
Selection.AutoFilter Field:=1, Criteria1:="CUSJHAATM"
Cells.Select
Selection.Copy
Sheets("CUSJHAATM").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("qry_all").Select
Application.CutCopyMode = False

'DATJHAATM
Selection.AutoFilter Field:=1, Criteria1:="DATJHAATM"
Cells.Select
Selection.Copy
Sheets("DATJHAATM").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("qry_all").Select
Application.CutCopyMode = False

Henry[_4_]

Not enough Memory running macro
 
Rich,

Don't know if this'll solve your problem but you can cut your code down to:

'CUSJHAATM
Selection.AutoFilter Field:=1, Criteria1:="CUSJHAATM"
Cells.Select
Selection.Copy Destination:= Sheets("CUSJHAATM").Range("A1")
Sheets("qry_all").Select
Application.CutCopyMode = False
Etc..............

HTH
Henry

"Rich96" wrote in message
...
I keep getting an error when it hits the 16th library. Basically I have
one worksheet with all information. I'm running this macro to split to
seperate worksheets which are already there. I've closed every
application and even rebooted. I still get not enough memory. I've
even split the macro into smaller ones but still get the error. Any
help/suggestions??



Sub split_libs()
'
' split_libs Macro
' Macro recorded 9/19/2003 by rbateman
'CUSJHAATM
Selection.AutoFilter Field:=1, Criteria1:="CUSJHAATM"
Cells.Select
Selection.Copy
Sheets("CUSJHAATM").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("qry_all").Select
Application.CutCopyMode = False

'DATJHAATM
Selection.AutoFilter Field:=1, Criteria1:="DATJHAATM"
Cells.Select
Selection.Copy
Sheets("DATJHAATM").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("qry_all").Select
Application.CutCopyMode = False




Jo[_4_]

Not enough Memory running macro
 
Don't know if this helps, but....
I have had these errors
Our IT guy fixed them by, in one instance upgrading form
Excel 97 to 2000 and with Excel 2000 installing all the
Excel patches he could find

-----Original Message-----
I keep getting an error when it hits the 16th library.

Basically I have
one worksheet with all information. I'm running this

macro to split to
seperate worksheets which are already there. I've closed

every
application and even rebooted. I still get not enough

memory. I've
even split the macro into smaller ones but still get the

error. Any
help/suggestions??



Sub split_libs()
'
' split_libs Macro
' Macro recorded 9/19/2003 by rbateman
'CUSJHAATM
Selection.AutoFilter Field:=1, Criteria1:="CUSJHAATM"
Cells.Select
Selection.Copy
Sheets("CUSJHAATM").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("qry_all").Select
Application.CutCopyMode = False

'DATJHAATM
Selection.AutoFilter Field:=1, Criteria1:="DATJHAATM"
Cells.Select
Selection.Copy
Sheets("DATJHAATM").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("qry_all").Select
Application.CutCopyMode = False
.



All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com