Personal.xlsb not closing down with Excel process

mrbenn

New Member
Joined
Jul 9, 2014
Messages
14
I have a few macros saved into my Personal.xlsb file which work as expected. The problem is that when i close Excel and look in Task Manager there is still at least one Excel.exe running which gradually builds up in memory until it causes the whole system to slow down. Having googled around I tried removing the Personal.xlsb files from the XLStart folder and without this Excel opens, works and closes as expected.

The macro i suspect is causing the problem is this one, it is the only one I have run today or since the PC rebooted last but I am at a loss to figure out what is happening?

Code:
Sub avail231()'
' 231Availability Report
'
'
'
Dim sSheetName As String
    Dim sDataRange As String
    sSheetName = ActiveSheet.Name
    sDataRange = Selection.Address
    strActiveWorkSheet = ActiveSheet.Name
Cells.Select
Columns.AutoFit
Cells(1, 1).Select
Dim rangeTemp As Range
Set rngTemp = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
If Not rngTemp Is Nothing Then
    Range(Cells(1, 1), rngTemp).Select
End If
Range("A1").Select
'1ST level SORT ON NAME COL A
'2ND level SORT ON START DATE COL B
'3RD levle SORT ON END DATE COL C
Sheets(sSheetName).Range("a1:u" & Sheets(sSheetName).Range("a1").End(xlDown).Row).Sort _
key1:=Sheets(sSheetName).Range("D:D"), order1:=xlAscending, _
key2:=Sheets(sSheetName).Range("B:B"), order2:=xlAscending, _
Header:=xlYes
'    Range("A1").Select
'    Selection.AutoFilter
'    ActiveSheet.Range("A:U").AutoFilter Field:=4, Criteria1:="BR50"
'    ActiveSheet.Range("A:U").AutoFilter Field:=6, Criteria1:="0"
'    ActiveSheet.Range("A:U").AutoFilter Field:=8, Criteria1:="1"
'    Selection.SpecialCells(xlCellTypeVisible).Select
'   Application.DisplayAlerts = False
'    ActiveSheet.UsedRange.Offset(1, 0).Resize(ActiveSheet.UsedRange.Rows.Count - 1).Rows.Delete
'    Application.DisplayAlerts = True
'ActiveSheet.ShowAllData
Range("A1").Select
    Selection.AutoFilter
    ActiveSheet.Range("A:U").AutoFilter Field:=4, Criteria1:="KL20"
    ActiveSheet.Range("A:U").AutoFilter Field:=2, Criteria1:=Array("EX/CLAMP", "EX/GSKT", "EX/MTG", "EX/TUBIN"), Operator:=xlFilterValues
    Selection.SpecialCells(xlCellTypeVisible).Select
   Application.DisplayAlerts = False
   ActiveSheet.UsedRange.Offset(1, 0).Resize(ActiveSheet.UsedRange.Rows.Count - 1).Rows.Delete
    Application.DisplayAlerts = True
    ActiveSheet.ShowAllData
Range("A1").Select
    Selection.AutoFilter
    ActiveSheet.Range("A:U").AutoFilter Field:=1, Criteria1:=Array("CLUTCH/CAR", "EXHAUSTS", "ROTATE", "T/MISSION"), Operator:=xlFilterValues
    ActiveSheet.Range("A:U").AutoFilter Field:=6, Criteria1:="0"
    ActiveSheet.Range("A:U").AutoFilter Field:=8, Criteria1:="1"
    Selection.SpecialCells(xlCellTypeVisible).Select
   Application.DisplayAlerts = False
   ActiveSheet.UsedRange.Offset(1, 0).Resize(ActiveSheet.UsedRange.Rows.Count - 1).Rows.Delete
    Application.DisplayAlerts = True
    ActiveSheet.ShowAllData
    If ActiveSheet.AutoFilterMode Then ActiveSheet.AutoFilterMode = False
Range("A1").Select
End Sub

Any help anyone could give would be very gratefully received
 
Fresh boot
From Start Menu: One instance in Task Manager (422,644K Memory in use) - closed and the process needed to be killed in Task Manager after a few minutes as it had not closed
Double Clicked Workbook: One instance (524,528K Mem in use) - closed and the process needed to be killed in Task Manager after a few minutes as it had not closed
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
This is still happening, Excel using over 600mb of RAM after it has been closed, killing system speeds
 
Upvote 0

Forum statistics

Threads
1,223,060
Messages
6,169,861
Members
452,286
Latest member
noclue2000

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