Hide excel, display userform only

C

carlito_1985

Hi everyone.
Is it possible that when you load a workbook, it hides everything
except for userform1?

The thing is it looks a bit silly with userform 1 loading up and having
excel with the toolbars etc behind it. One thing i did do was make it so
before the userform loaded, it shrunk excel to the smallest size
possible and positioned it behind the userform. But when you use
userform1 and click on "go" it runs a macro which hides userform1, then
has to maximize the window and then display sheet2 which also looks a
bit silly.

Any ideas?

Thanks,
Andy
 
B

Bob Phillips

Andy,

Add this code to your userform


Private Sub UserForm_Activate()
Application.Visible = False
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Application.Visible = True
End Sub



--
HTH

Bob Phillips

"carlito_1985" <[email protected]>
wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top