What am I missing? First time I've had this error. Actual statement causing the error is almost at end of code identified by "'===Errors===" but I've posted it all.
TIA
TIA
Ron
TIA
VBA Code:
Option Explicit
Sub m_Make_File()
' 20211118
' Set start ws to hidden
'----
Call CleanWindow_m ' opens the blank worksheet to minimize screen refresh.
'---- Post after "CleanWindow" and prior to module
Application.ScreenUpdating = True
Application.StatusBar = "Starting conversion of the file."
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.DisplayStatusBar = True
'
Call m_SaveLocalWbasXLSM
'
Application.ScreenUpdating = True
Application.StatusBar = "Importing the file."
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.DisplayStatusBar = True
'+++
Call GetFileList_m
Call m_RemoveConnections
Call AutoImportFile_m
'+++
'----
Application.ScreenUpdating = True
Application.StatusBar = "Modifying the file headers."
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.DisplayStatusBar = True
'+++
Call ReNameHeaders_m 'creates rng_HeaderRow & rng_tbl
'+++
'----
Application.ScreenUpdating = True
Application.StatusBar = "Re-ording the file columns."
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.DisplayStatusBar = True
'+++
Call OrderColumns_m
'+++
Application.ScreenUpdating = True
Application.StatusBar = "Converting Employee ID Number to Text."
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.DisplayStatusBar = True
'+++
Call MakeRanges_m ' also makes employee ID text
'+++
Application.ScreenUpdating = True
Application.StatusBar = "Applying easy to read formating."
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.DisplayStatusBar = True
'+++
Call ExcelDiet_m
'+++
Call FormatReport_m
'+++
Call m_SaveEnabledWBasXLSM
Call SaveFinalasCSV_m
'+++
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.StatusBar = " "
Application.Wait (Now + TimeValue("00:00:1"))
'
'
'===Errors===
'Sheet1.Visible = xlSheetVisible
Sheet(1).Visible = xlSheetVisible
'Sheet1.Activate
Sheet(1).Activate
'===
'
'
Application.Wait (Now + TimeValue("00:00:2"))
ActiveWindow.SmallScroll down:=3
ActiveWindow.SmallScroll down:=-3
ws_Blank.Visible = xlVeryHidden
Application.StatusBar = " "
Application.Wait (Now + TimeValue("00:00:2"))
Application.StatusBar = "Completed conversion of file."
Application.StatusBar = ""
Dim answer As Integer
answer = MsgBox("Completed", vbOKOnly, "Report Conversion Completed")
ThisWorkbook.Saved = True
'
End Sub
TIA
Ron