Hide userform's workbook and leave other excel workbooks un-hidden

MBaker25

New Member
Joined
Sep 6, 2014
Messages
7
Hello all,


I created a Userform in Excel 2013 -


I want only the Userform to be visible and it's workbook hidden. The code I'm using does show the Userform, but also hides all open workbooks in excel leaving only the userform visible. What code do I use to only hide the Userform's workbook and leave other open workbooks un-hidden?

The code below is as far as I got -

Private Sub Workbook_Open()

Application.Visible = False
UserForm1.Show

End Sub

I am sure the "Application.Visible = False" is the problem, I tried "Thisworkbook.visible = False" but got an error message. Any suggestions??
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Alan_P

Well-known Member
Joined
Jul 8, 2014
Messages
596
Hi mBaker25,

Try it with

Code:
ThisWorkbook.Windows(1).Visible = False

Cheers,
Alan.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,336
Messages
5,601,023
Members
414,421
Latest member
tonybear1994

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top