Solved

hide all sheets

Posted on 2011-02-23
3
301 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

632 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