You cannot have random bits of orphan code in a module. The section I highlighted is unconnected to any of the subs above it and will produce an error condition.

To see the problem, click Debug > Compile Normal and watch the sparks fly.

If you want to setup the form, the setup code goes in Sub Userform_Initialize

If you want to process document from the form the code to goes in Sub EnterBut_Click

Each sub should end at End Sub - you cannot add stuff below that that is not a sub in its own right, which is why it is not working.