So first off, if anyone knows anything about Excel they can open the code and SEE the password in INFO, so you might want to also put a password on the code itself, which is a bit annoying but useful. At the end of the day a guru can likely get into anything locked or not.
Now for your question it is a rather simple request.
Private Sub CommandButton2_Click()
Dim ws As Worksheet
'
For Each ws In ActiveWorkbook.Worksheets
If UCase(ws.Name) <> "MI" Then ws.Visible = xlSheetVisible
Next ws
End Sub
It means if the worksheet name is NOT "MI" then make the sheet visible.
You don't HAVE to make it uppercase using UCASE but I find it less likely to cause problems in the future and it is easy enough to throw in.
Bookmarks