Hiding an Excel worksheet with VBA

后端 未结 5 993
再見小時候
再見小時候 2020-12-05 17:33

I have an Excel spreadsheet with three sheets. One of the sheets contains formulas for one of the other sheets.

Is there a programmatic way to hide the sheet which c

5条回答
  •  时光取名叫无心
    2020-12-05 17:47

    This can be done in a single line, as long as the worksheet is active:

    ActiveSheet.Visible = xlSheetHidden
    

    However, you may not want to do this, especially if you use any "select" operations or you use any more ActiveSheet operations.

提交回复
热议问题