简体   繁体   English

如何使用VBA取消隐藏工作簿中的每个Excel工作表?

[英]How can I Unhide every Excel sheet in a workbook using VBA?

How can I Unhide every Excel sheet in a workbook using VBA without having to list all the sheets like below. 如何使用VBA取消隐藏工作簿中的每个Excel工作表,而不必像下面那样列出所有工作表。

Sub UnhideAllSheets()

    Sheets("Sheet1").Visible = True
    Sheets("Sheet2").Visible = True
End Sub

You can Unhide all of the sheets in Excel using the following VBA code 您可以使用以下VBA代码取消隐藏Excel中的所有工作表

Sub UnhideAllSheets()
    Dim ws As Worksheet

    For Each ws In ActiveWorkbook.Worksheets
        ws.Visible = xlSheetVisible
    Next ws

End Sub

Credit to This Website 归功于本网站

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 VBA - 将每个工作表保存为excel工作簿中的值 - VBA - saving every sheet as values in excel workbook 如何根据不同工作表中的值隐藏和取消隐藏 Excel 中的特定表(在我的情况下为整行)? VBA - How can I hide and unhide specific tables (in my case entire rows) in excel based on a value in a different sheet? VBA 如何使用VBA删除工作簿中每个工作表的第一列 - How to delete the first column in every sheet in a workbook using VBA 如何取消隐藏多个 Excel 文件中的特定工作表。 工作表是使用 vba 隐藏的吗? - how can i unhide a specific worksheet in multiple excel files. the worksheet were hidden using vba? Excel VBA-如何使用不同的子例程将行从工作簿的行复制到另一个工作簿的工作表 - Excel VBA - How to copy row by row from a sheet of workbook to another Workbook's sheet using different subroutine VBA隐藏我的工作簿窗口,如何在保存之前取消隐藏 - vba hides my workbook window, how can i get it to unhide before saving Excel VBA如何在工作簿中没有的情况下跳过工作表 - Excel VBA how to skip a sheet if isnt not in the workbook 如何将Excel工作表复制到窗口不可见的工作簿中? - How can I copy an Excel sheet into a workbook whose windows are not visible? 我如何使用打印范围作为来源将图纸复制和excel到新工作簿 - How can I copy and excel sheet to a new workbook using the print range as the source 使用VBA的工作表到工作簿 - Sheet To Workbook using VBA
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM