I've dug and dug and dug online to try and solve this before coming here, so I hope someone can help me.
I have really simple vba in this report to auto apply a couple of filters to the data by clicking a button. At some point, something happened that made it so when I opened the file, I could move around, scroll, cycle through report tabs, but as soon as I try to save the document (Ctrl+S or otherwise) or if I click Ctrl + F the excel workbook crashes.
I was able to solve this issue by simply deleting my vba out of the workbook...which tells me that my vba is the problem...but I have no idea what the problem could be. Consequently I can re-copy my vba code from notepad back into the excel workbook module and save, and everything works fine...
Excel 2013 64 bit
VBA:
I have really simple vba in this report to auto apply a couple of filters to the data by clicking a button. At some point, something happened that made it so when I opened the file, I could move around, scroll, cycle through report tabs, but as soon as I try to save the document (Ctrl+S or otherwise) or if I click Ctrl + F the excel workbook crashes.
I was able to solve this issue by simply deleting my vba out of the workbook...which tells me that my vba is the problem...but I have no idea what the problem could be. Consequently I can re-copy my vba code from notepad back into the excel workbook module and save, and everything works fine...
Excel 2013 64 bit
VBA:
Code:
Option Explicit
Sub CoreItemNeedFilter()
On Error Resume Next
ActiveSheet.Range("$A$12:$AI$30000").AutoFilter
ActiveSheet.Range("$A$12:$AI$30000").AutoFilter Field:=5, Criteria1:=Array( _
"Core Item Buffer", "PO Need with Buffer", "Purchase Order Need"), Operator:= _
xlFilterValues
End Sub
Sub RegularItemNeedFilter()
On Error Resume Next
ActiveSheet.Range("$A$12:$AI$30000").AutoFilter
ActiveSheet.Range("$A$12:$AI$30000").AutoFilter Field:=5, Criteria1:="Purchase Order Need", Operator:=xlFilterValues
End Sub
Sub ClearFilter()
On Error Resume Next
ActiveSheet.Range("$A$12:$AI$30000").AutoFilter
End Sub
Sub RefreshPivots()
Calculate
Do Until Application.CalculationState = xlDone
DoEvents
Loop
Workbooks("Inventory Plan.xlsm").RefreshAll
End Sub