Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Question 1:
We are missing the visual basic code for selecting all sheets in the workbook without having specific names for all the sheets. Question 2: We want to unhide all hidden sheets in the workbook without specifying specific names of them with one line of code. We have achieved this with for next already but not with a specific code line. For Each sh In Sheets sh.Visible = True Next sh |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For your first question, use
Worksheets.Select For your second question, you need to use the For Next loop. There isn't a single line of code for unhiding all worksheets. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Hande & Tolga" wrote in message ... Question 1: We are missing the visual basic code for selecting all sheets in the workbook without having specific names for all the sheets. Question 2: We want to unhide all hidden sheets in the workbook without specifying specific names of them with one line of code. We have achieved this with for next already but not with a specific code line. For Each sh In Sheets sh.Visible = True Next sh |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Q1()
Dim wsArray() As String Dim ws As Worksheet Dim index As Long ReDim wsArray(1 To Worksheets.Count) For index = 1 To Worksheets.Count wsArray(index) = Worksheets(index).Name Next Sheets(wsArray).Select Sheets("Sheet6").Activate End Sub Sub Q2() Dim ws As Worksheet For Each ws In Worksheets ws.Visible = xlSheetVisible Next End Sub Patrick Molloy Microsoft Excel MVP -----Original Message----- Question 1: We are missing the visual basic code for selecting all sheets in the workbook without having specific names for all the sheets. Question 2: We want to unhide all hidden sheets in the workbook without specifying specific names of them with one line of code. We have achieved this with for next already but not with a specific code line. For Each sh In Sheets sh.Visible = True Next sh . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Option button unhide row | Excel Discussion (Misc queries) | |||
Using Hide, Unhide, and auto filter - select all on a protected sh | Excel Worksheet Functions | |||
Unhide hidden sheets | Excel Discussion (Misc queries) | |||
How to Unhide sheets | Excel Discussion (Misc queries) | |||
How do I unhide multiple sheets? | Excel Worksheet Functions |