Lost view of Application

B

BillD

I am trying to set up a workbook so that only the userform is visible when
the workbook is open. I went into the code and in workbook I entered the
following:

Application visible= false
Userform.show

When I clicked on the workbook to open it the userform came up like I was
wanting but now I can't get back into the application.

Is there anyway now to get back into the workbook to make changes?

If not can someone tell me how I can set the workbook so when it is opened
no one can make any changes or unhide the worksheets. In other words is it
possible to at least hide the ribbon/toolbars.

Thanks in advance
 
J

JLGWhiz

You could try adding code to one of the UserForm events, maybe Unload:

Private Sub UserForm_Deactivate()
Application.Visible = True
End Sub
 
A

anlu

Have you tried holding down the SHIFT key, when opening your worksheet to
prevent your code from running?

If that does not work you can password protect your workbook - as far as I
remember this means that people can only unhide sheets if they know the
password to unprotect the workbook.

Regards,
anlu
 

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