Here's my issue:
Private Sub Workbook_Open()
'the name of the current user
Dim UserName As String
'on opening, find out who this is (and convert to lower case)
Dim wb As Workbook
Set wb = Workbooks("Staffing Log - HQ - 2018 - 2019.xlsm")
wb.Activate
UserName = LCase(Environ("UserName"))
On Error Resume Next
Application.Visible = False
'ActiveWindow.Visible = False
Sheets("GoodDBData").Visible = True ERROR OCCURS HERE
end sub
When I open this workbook while having another workbook already open, I keep getting the subscript out of range. It's as if even if I tell the program to ACTIVATE the proper workbook with the wb.Activate it does not recognize it.
Any idea why? Thank you