Macro causing low memory warnings

Phantasm

Board Regular
Joined
Nov 2, 2007
Messages
58
The macro below is causing a memory warning after it is executed a few times. Is there anything I can do to code it better?

Code:
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
Application.EnableEvents = False
    With Sheets("JOBS IN PROCESS NEW")
        If .AutoFilterMode Then .AutoFilterMode = False
        .Range("A1:P1").AutoFilter 16, "<>"
        .AutoFilter.Range.Resize(.AutoFilter.Range.Rows.Count - 1).Offset(1).Copy Worksheets("SHIPPED ORDERS").Range("A" & Rows.Count).End(xlUp).Offset(1)
        .AutoFilter.Range.Resize(.AutoFilter.Range.Rows.Count - 1).Offset(1).EntireRow.Delete
        .AutoFilterMode = False
        If Not Worksheets("JOBS IN PROCESS NEW").Range("A1:O1").AutoFilter Then
            Worksheets("JOBS IN PROCESS NEW").Range("A1:O1").AutoFilter
        End If
        ActiveWorkbook.Sheets(3).Activate
        Rows("2:150").RowHeight = 16.5
    End With
    Application.ScreenUpdating = True
    Application.EnableEvents = True
Application.DisplayStatusBar = True
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
 
Last edited by a moderator:

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,214,827
Messages
6,121,809
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top