Have you tried changing the ambiguous
Set ws = Worksheets("Settings")
to the explicit
Set ws = ThisWorkbook.Worksheets("Settings")
?

Also try changing your
Private Sub Workbook_Open()

Unload UserForm2
UserForm2.Show

End Sub
to
Private Sub Workbook_Open()

Load UserForm2
UserForm2.Show

End Sub

Let me know if it works. Stabbing in the dark without a sample file unfortunately.