Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide all worksheets in excel and open form

Status
Not open for further replies.

neemi

Programmer
May 14, 2002
519
GB
Hi,

I have created a userform in Excel and want to display this without any worksheets in the background. I can hide all but the main worksheet. Is it possible to just display a userform on opening the excel file without any worksheets in the background?

cheers,
Neemi
 
You can't have workbook with all sheets hidden. Instead hide window:
Code:
ThisWorkbook.Windows(1).Visible = False
UserForm1.Show
You can consider hiding application (application.visible=false) and make it visible when you close the userform.

combo
 
but be careful when developing like this - all too easy to end up with lots of "invisible" excel sessions in teh background because something hasn;t quite worked how it should...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
I'm just gonna leave it with the sheet showing. set the colur of it to Black!!! with form infront!
 
The recovery of hidden application, code outside excel (word for instance), all visible excel instances closed:
Code:
Dim xlApp As Object
Set xlApp = GetObject(, "Excel.Application")
xlApp.Visible = True
Set xlApp = Nothing

combo
 
Hi Neemi,

Instead of changing the worksheet colours, you could hide all rows and/or columns.

Cheers

[MS MVP - Word]
 
Check out this FAQ that I found. Might not be just what you are looking for, but it definetly points you in the right direction.
How do I "hide" Excel? faq707-1572

Chilly442
 
Alternatively, rather than hiding it, you could just minimise it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top