Excel Crash while saving

jtkr996

New Member
Joined
Mar 3, 2008
Messages
10
Hello,

I have a workbook used by a couple different people (but not at the same time) that is intermittently crashing while trying to save. The file is saved on a network share. Judging by the error message it's a issue with my VBA code.

I can open the file on a different computer and it works fine. The other computer having the issue will continue to crash until the file is "fixed".

My temporary fix has been to open the file on the working computer, compile the VBA project and re-saving. After these steps the file works fine on both computers and will continue to do so for days. Then seemingly at random the issue will return.

Both computers are running 32 bit Excel 2016.

The VBA in this workbook is fairly basic and is just used to automate a refresh and also saving a report as a .pdf while adding a date to the file name.

The error message and all my code is below. Any help would be appreciated.

Code:
[B]Problem signature:[/B]
  Problem Event Name:                        APPCRASH
  Application Name:                             EXCEL.EXE
  Application Version:                           16.0.7766.2099
  Application Timestamp:                     595a6ab2
  Fault Module Name:                          VBE7.DLL
  Fault Module Version:                       0.0.0.0
  Fault Module Timestamp:                 57e4bc6a
  Exception Code:                                  c0000005
  Exception Offset:                                001b2512
  OS Version:                                          6.1.7601.2.1.0.256.48
  Locale ID:                                             1033
 
[B]Additional information about the problem:[/B]
  LCID:                                                     1033
  skulcid:                                                1033


VBA:

Code:
Sub Finalize_EOM_Summary()'
' Finalize_EOM_Summary Macro
' Makes static copy of current EOM summary
'


'
'
    Sheets("EOM Summary").Select
    ActiveSheet.Unprotect
    Sheets("EOM Summary").Copy After:=Sheets(Sheets.Count)
    Range("B1:P90").Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    ActiveSheet.Shapes.Range(Array("Button 1")).Select
    Selection.delete
    Range("B5").Select
    ActiveSheet.Name = ActiveSheet.Range("AA2")
    Application.CutCopyMode = False
    
   ' Delete Slicer copy
    ActiveSheet.Shapes.Range(Array("Salesperson Name 1")).Select
    ActiveWorkbook.SlicerCaches("Slicer_Salesperson_Name").Slicers( _
        "Salesperson Name 1").delete
        
    Columns("Q:Q").Select
    Selection.delete Shift:=xlToLeft
    
    Range("P1").Select
        
    ' Protect sheet
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    
           
End Sub

Code:
Sub Refresh_All()'
' Refresh_All Macro
'


'
    ActiveWorkbook.RefreshAll
    DoEvents
    MsgBox ("Data Refresh Completed")
    
End Sub

Code:
Sub Refresh_Daily()'
' Refresh_Daily Macro
'


'
    ActiveWorkbook.RefreshAll
    DoEvents
    MsgBox ("Data Refresh Completed")
    Sheets("Daily Dashboard").Select
End Sub

Code:
Sub SavePDF()'
' SavePDF Macro
'


'
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        "\\shares01\Parts MGR\Daily Reports Archive\Parts Daily Dashboard" & " " & Format(Now, "mm-dd-yy") & ".pdf" _
        , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
        :=False, OpenAfterPublish:=True
End Sub


Sub SavePDF_EOM()
'
' SavePDF Macro
'


'
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        "\\shares01\End Of Month reports\EOM Report PDF Archive\EOM Report " & " " & Format(Now, "mm-dd-yy") & ".pdf" _
        , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
        :=False, OpenAfterPublish:=True
End Sub




Sub SavePDF_Adj()
'
' SavePDF Macro
'


'
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        "\\shares01\End Of Month reports\EOM Report PDF Archive\Adjustment Detail Report " & " " & Format(Now, "mm-dd-yy") & ".pdf" _
        , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
        :=False, OpenAfterPublish:=True
End Sub
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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