Here is the first part of the code
Private Sub Workbook_Open()
' open workbook startup macro
'
wbname = ThisWorkbook.fullname
wbpath = ThisWorkbook.Path
Sheets(1).Activate
If MsgBox("Good morning ! Would you like to update reports ??", vbYesNo, "") = vbNo Then
Sheets(1).Activate
End
End If
Application.ScreenUpdating = False
Call SheetsVisible
Call showprogress
'MsgBox "estimate dates / move estimate data"
Call copy_batting
Call Estimates2
Sheets(1).Activate
Userform1.CheckBox1.Value = True
DoEvents
then the subroutine where it fails - line windows.(wbname).activate is "empty"
Sub copy_batting()
'Batting Report
Application.ScreenUpdating = False
Windows(wbname).Activate
Sheets("E").Activate
Cells.Select
Selection.ClearContents
Workbooks.Open Filename:= _
wbpath & "batting.xls"
Cells.Select
Selection.Copy
Windows(wbname).Activate
Sheets("E").Select
ActiveSheet.Paste
Range("a1").Select
Application.CutCopyMode = False
Windows("batting.xls").Close
End Sub