Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

hide all sheets

Posted on 2011-02-23
3
Medium Priority
?
306 Views
Last Modified: 2012-05-11
Hi,

Im trying to hide all sheets and its not quite working

Dim objSht
For Each objSht In ActiveWorkbook.Sheets
      objSht.Hidden = xlSheetHidden
   Next objSht
   
Can anyone amend?

Thanks
Seamus
0
Comment
Question by:Seamus2626
3 Comments
 
LVL 48

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 34960320
You can't hide *all* sheets, as there must always be one visible at any one time.
0
 
LVL 8

Accepted Solution

by:
pdd1lan earned 2000 total points
ID: 34960346
you can hide sheets, but you need to leave one open.

Dim objSht
For Each objSht In ActiveWorkbook.Sheets
    If objSht.Name <> "Sheet3" Then
   
      objSht.Visible = xlSheetVeryHidden
    End If

   Next objSht
0
 

Author Closing Comment

by:Seamus2626
ID: 34960422
Thats what i need, thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question