Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have made an userform in excel for some application. In the process, I made the excel hide to show only the form using the following code:

Private Sub Workbook_Open()
Application.Visible = False
UserForm1.Show
End Sub


My problem is that it worked so fine that now I am not able to see my own code!! I am not able to open my vba editor!! How can I make the application visible again?? Please help!!

What I have tried:

I have tried opening and closing the application again and again, right clicking, pressing alt+f11. Nothing works!!
Posted
Updated 6-Apr-17 22:27pm

1 solution

Sorry, I did laugh a little bit. But only because it has happened to me too :-D

You have to open the spreadsheet without running macros...

1. Open Excel from the Start Menu (do not select any previous workbooks)

2. Using the File, Open menu, locate your problem workbook and highlight it (don't double click it!

3. Hold down the [SHIFT] key and click the 'Open' button. Don't let go of that [SHIFT] key until the workbook is fully loaded (it took me a while to get my head around that bit)

4. You should be ok now to remove the code from Workbook_Open.

I guess you have realised that if you make the Excel application invisible, your form will be invisible too ... as it's part of the application
 
Share this answer
 
Comments
planetz 7-Apr-17 4:55am    
The unhide worked as wonderfully as the hide. Thank you so much..!! First time a problem made me laugh too.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900