I'm having a problem when adding new sheets to a Workbook from a UserForm. Basically whenever I add a new sheet, it appears to be linked to another sheet in the same workbook.
I have been able to reproduce this issue fairly easily by creating a new Excel file, then adding it a new userform with this code in it:
Private Sub UserForm_Click()
Sheets.Add
Call Unload(Me)
End Sub
If I open the userform from a sheet such as this one:
And then I double click the userform, the issue already happens.
The new sheet is works incorrectly. For example if I write on any cell of the new sheet I get the formatting from the original sheet. Worse still, if the original sheet is protected, I'm not allowed to write on the new sheet (though the ribbon shows it's unprotected).
If I select another sheet and select the new sheet again everything returns to normal. Am I doing something wrong? If it's a bug is there any workaround?
Here is an Excel file that produces the error: Drive.google.com