Hmmm... that's 'interesting' - I've never seen code like that before.
I've managed to combine your code & mine to hide all tables in one go
BUT when I tried doing the same in reverse, only tblUser is restored!
At the moment I can't see how to get them all back which is no use at all.
They also can't be seen from an external database where hidden tables are visible ... again something I've never seen before.
If a method for restoring them all exists, this could be very useful but at the moment I don't know the solution
Suggest you look at the source for this code & see if they have a solution
In the meantime, I have a different suggestion....
To secure my databases, I hide all tables together with hiding the navigation pane & ribbon together with other security measures. I then distribute as an ACCDE so users cannot look at tables or code. Would that work for you?