![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Dallas, TX
Posts: 312
|
Hello All,
I want to hide an array of data sheets when my workbook opens, unhide them for refreshing the data and calculations, then hide them again after the calculation is finished. Any help would be appreciated. Steve |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
The following are examples from the help file on the "visible property":
Quote:
Hope this helps. Kind regards, Al. [ This Message was edited by: Al Chara on 2002-05-17 13:00 ] |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Dallas, TX
Posts: 312
|
Thanks, that helps. What was the Sub name to kick off a macro when the file opens? I forgot.
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
You could amend the following code, which will hide all sheets part from summary when the workbook is opened: -
Private Sub Workbook_Open() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If ws.Name <> "Summary" Then ws.Visible = False Next ws End Sub Place the above in the ThisWorkbook module. About the easiest way to unhide them would be to stick a command button on the unhidden sheet and assign it the following code: - Private Sub CommandButton1_Click() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Visible = True Next ws End Sub Hope this helps. |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Dallas, TX
Posts: 312
|
Yes, thanks guys...that works just fine!
Steve |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|