I needed to put VBAProject in front of the code.

so to hide userform1 the code is VbaProject.userform1.hide...