supportsvc
Technical User
Hello,
I can't figure out why, but the script to refresh, save then export and save as a .xlsx from the .xlsm with multiple worksheets keeps freezing, I believe on processing the Export function.
This hasn't happened before so I am not sure why it started.
I compared the script with other workbooks that do the same and even copied and pasted and edited the worksheets names.
When I open the .xlsm without launching the code and RefreshAll, that all works. So I know it's not that part. When I select the export section, it worked but then when attempted again, it froze.
This is the only thing that's available as to the freezing up issue. Anyone know what it could be?
Here's the script:
I can't figure out why, but the script to refresh, save then export and save as a .xlsx from the .xlsm with multiple worksheets keeps freezing, I believe on processing the Export function.
This hasn't happened before so I am not sure why it started.
I compared the script with other workbooks that do the same and even copied and pasted and edited the worksheets names.
When I open the .xlsm without launching the code and RefreshAll, that all works. So I know it's not that part. When I select the export section, it worked but then when attempted again, it froze.
This is the only thing that's available as to the freezing up issue. Anyone know what it could be?
Code:
Problem signature:
Problem Event Name: BEX
Application Name: EXCEL.EXE
Application Version: 16.0.10325.20118
Application Timestamp: 5b68edfd
Fault Module Name: mso20win32client.dll
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 5b523906
Exception Offset: 001cc5e4
Exception Code: c0000409
Exception Data: 00000000
OS Version: 6.3.9600.2.0.0.272.7
Locale ID: 1033
Additional Information 1: d8a0
Additional Information 2: d8a003d775674474d9dbe93763039399
Additional Information 3: 2019
Additional Information 4: 2019e8e39e89e6d242ffd268a36c7e98
Read our privacy statement online:
[URL unfurl="true"]http://go.microsoft.com/fwlink/?linkid=280262[/URL]
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Here's the script:
Code:
Private Sub Workbook_Open()
Dim myPath As String
Application.DisplayAlerts = False
ThisWorkbook.RefreshAll
DoEvents
Application.DisplayAlerts = False
ThisWorkbook.Save
myPath = Application.ActiveWorkbook.Path
Worksheets(Array("DailyOps", "Consolidated", "Bookings", "Shipped", "OpenOrders", "Backlog")).Copy
ActiveWorkbook.SaveAs Filename:="C:\Users\Operations\DailysOps-" & Format(Date, "yyyy-mm-dd") & ".xlsx", FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
DoEvents
Application.Quit
End Sub