Lost view of Application

  • Thread starter Thread starter BillD
  • Start date Start date
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
 
You could try adding code to one of the UserForm events, maybe Unload:

Private Sub UserForm_Deactivate()
Application.Visible = True
End Sub
 
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
 
Back
Top