Solved

hide all sheets

Posted on 2011-02-23
3
296 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 47

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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

756 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