Hiding active workbook programmatically in Excel

后端 未结 3 1481
旧时难觅i
旧时难觅i 2020-12-03 17:19

I\'m working on a VBA project based in a workbook. The code opens a new workbook and calls an external API which downloads and inserts a bunch of data in multiple worksheets

3条回答
  •  独厮守ぢ
    2020-12-03 18:18

    Hiding the active workbook is possible with

    ActiveWorkbook.Windows(1).Visible = False
    

    You may need to replace ActiveWorkbook with an appropriate reference if the workbook in question is not the active one and/or add a loop like For i = 1 To ActiveWorkbook.Windows.Count if the workbook has multiple windows.

提交回复
热议问题